mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
15 lines
256 B
Text
15 lines
256 B
Text
---
|
|
export interface Props extends Record<any, any> {
|
|
level?: number | string;
|
|
role?: string;
|
|
}
|
|
|
|
const { level, role, ...props } = {
|
|
...Astro.props,
|
|
};
|
|
|
|
props.role = role || 'heading';
|
|
props['aria-level'] = level || '1';
|
|
---
|
|
|
|
<h {...props}><slot /></h>
|