import { clsx } from 'clsx'; import { HTMLAttributes, PropsWithChildren } from 'react'; import { CommonProps } from '../common'; import Header from '../Header'; type SectionProps = PropsWithChildren< CommonProps & { as?: 'div' | 'fieldset' | 'section'; withHorizontalPadding?: boolean; } > & Pick, 'id' | 'role' | 'aria-labelledby'>; /** * * Neptune Web: https://storybook.wise.design/?path=/docs/content-section--docs * * Use `Section.Header` for the section's title and optional action. */ const Section = ({ as: Element = 'div', children, className, withHorizontalPadding = false, role = undefined, ...restProps }: SectionProps) => { return ( {children} ); }; // eslint-disable-next-line functional/immutable-data const SectionNamespace = Object.assign(Section, { Header }); export default SectionNamespace;