import { type FC, type HTMLAttributes, type ReactNode } from 'react'; import cn from 'classnames'; import type { HeadingLevels } from '../types/common'; import '../styles/components/hero-container.scss'; type HeroContainerProps = HTMLAttributes & { /** * The heading of the component */ headingContent?: ReactNode; /** * The heading level */ headingLevel?: HeadingLevels; /** * CSS classes to pass to the component heading */ headingClassName?: string; /** * Remove left and right padding */ noSidePadding?: boolean; }; export const HeroContainer: FC & HTMLAttributes = ({ headingContent, headingLevel: HeadingLevel = 'h2', headingClassName, children, className, noSidePadding = false, ...props }) => (
{headingContent && ( {headingContent} )} {children}
); export default HeroContainer;