import { type ReactNode, type HTMLAttributes, type FC } from 'react'; import cn from 'classnames'; import '../styles/components/header.scss'; type HeaderProps = { /** * Component to display where the link to the home page will be */ homepageLink?: ReactNode; /** * Search component */ search?: ReactNode; /** * Secondary items */ secondaryItems?: ReactNode; /** * Subtext */ subtext?: ReactNode; /** * Flag representing if the header should be in a "negative" style */ isNegative?: boolean; }; const Header: FC> = ({ search, secondaryItems, subtext, isNegative = false, className, homepageLink, children, ...props }) => (
{homepageLink}
{children}
{search}
{(secondaryItems || subtext) && (
{secondaryItems && (
{secondaryItems}
)} {subtext && {subtext}}
)}
); export default Header;