import { forwardRef } from 'react' import { ShadowContainer } from '../ShadowContainer' import { SectionHeading } from './SectionHeading' type SectionProps = React.ComponentPropsWithRef<'section'> & { heading?: string description?: string isMain?: boolean withoutShadowContainer?: boolean } export const Section = forwardRef((props, ref) => { 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}
) })