blob: e4837a6ccd6358e0b5f06a4d2b9d4354d21560f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import {
type ForwardRefRenderFunction,
type HTMLAttributes,
type ReactNode,
forwardRef,
} from 'react';
export type HeaderProps = HTMLAttributes<HTMLElement> & {
/**
* The header contents.
*/
children: ReactNode;
};
const HeaderWithRef: ForwardRefRenderFunction<HTMLElement, HeaderProps> = (
props,
ref
) => <header {...props} ref={ref} />;
/**
* Header component.
*/
export const Header = forwardRef(HeaderWithRef);
|