import type {SectionProps} from '@givewp/forms/propTypes'; /** * @since 4.3.0 update legend to use the description prop. */ const Legend = ({name, description}: {name: string; description?: string}) => { return description.length > 0 ? (
{description.length > 0 && {description}}
) : ( <> ); }; /** * @since 4.3.0 use h3 tag for the section label. */ export default function Section({ section: {name, label, description}, hideLabel, hideDescription, children, }: SectionProps) { return ( <> {hideLabel ? '' : label.length > 0 &&

{label}

}
{children}
); }