diff options
Diffstat (limited to 'examples/component/packages/my-component/Heading.astro')
-rw-r--r-- | examples/component/packages/my-component/Heading.astro | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/examples/component/packages/my-component/Heading.astro b/examples/component/packages/my-component/Heading.astro index f27e74b3d..813c0c11b 100644 --- a/examples/component/packages/my-component/Heading.astro +++ b/examples/component/packages/my-component/Heading.astro @@ -1,18 +1,15 @@ --- export interface Props extends Record<any, any> { - level?: number | string - role?: string + level?: number | string; + role?: string; } -const { - level, - role, - ...props -} = { - ...Astro.props -} as Props +const { level, role, ...props } = { + ...Astro.props, +} as Props; -props.role = role || 'heading' -props['aria-level'] = level || '1' +props.role = role || 'heading'; +props['aria-level'] = level || '1'; --- -<h {...props}><slot /></h>
\ No newline at end of file + +<h {...props}><slot /></h> |