18 lines
260 B
Text
18 lines
260 B
Text
|
---
|
||
|
export interface Props extends Record<any, any> {
|
||
|
level?: number | string
|
||
|
role?: string
|
||
|
}
|
||
|
|
||
|
const {
|
||
|
level,
|
||
|
role,
|
||
|
...props
|
||
|
} = {
|
||
|
...Astro.props
|
||
|
} as Props
|
||
|
|
||
|
props.role = role || 'heading'
|
||
|
props['aria-level'] = level || '1'
|
||
|
---
|
||
|
<h {...props}><slot /></h>
|