diff options
Diffstat (limited to 'src/components/atoms/layout/header/header.tsx')
| -rw-r--r-- | src/components/atoms/layout/header/header.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/atoms/layout/header/header.tsx b/src/components/atoms/layout/header/header.tsx new file mode 100644 index 0000000..e4837a6 --- /dev/null +++ b/src/components/atoms/layout/header/header.tsx @@ -0,0 +1,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); |
