import { ShadowContainer } from '../ShadowContainer' import { SectionHeading } from './SectionHeading' type SectionProps = React.ComponentPropsWithRef<'section'> & { heading?: string description?: string isMain?: boolean withoutShadowContainer?: boolean } export const Section: React.FC = (props) => { const { children, heading, description, isMain = false, withoutShadowContainer = false, ...rest } = props if (isMain) { return (
{heading != null && {heading}}
{children}
) } if (withoutShadowContainer) { return (
{heading != null && {heading}}
{children}
) } return (
{heading != null && ( {heading} )} {description != null && (

{description}

)}
{children}
) }