mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-09 22:50:17 -04:00
Add h1 props to PrimaryHeader
This commit is contained in:
parent
0eced26ed8
commit
4a0d32a42e
|
@ -1,7 +1,18 @@
|
||||||
|
// from node_modules/react/index.d.ts: global -> JSX -> IntrinsicElements
|
||||||
|
type h1Props = React.DetailedHTMLProps<
|
||||||
|
React.HTMLAttributes<HTMLHeadingElement>,
|
||||||
|
HTMLHeadingElement
|
||||||
|
>;
|
||||||
|
|
||||||
export default function PrimaryHeader({
|
export default function PrimaryHeader({
|
||||||
children,
|
children,
|
||||||
|
...props
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
} & h1Props) {
|
||||||
return <h1 className='my-4'>{children}</h1>;
|
return (
|
||||||
|
<h1 className='my-4' {...props}>
|
||||||
|
{children}
|
||||||
|
</h1>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user