import { Children } from 'react' const FormSection = ({ children, header, disabled, visible = true, className, }: { children: React.ReactNode header?: React.ReactNode disabled?: boolean visible?: boolean className?: string }) => { const classes = [ 'grid grid-cols-12 gap-6 px-8 py-8', `${disabled ? ' opacity-30' : ' opacity-100'}`, `${visible ? ' block' : ' hidden'}`, `${className}`, ] return (
{header} {children}
) } const FormSectionLabel = ({ className = '', children, }: { className?: string children: React.ReactNode | string }) => { return ( ) } const Shimmer = () => (
) const FormSectionContent = ({ children, loading = true, fullWidth, className, }: { children: React.ReactNode | string loading?: boolean fullWidth?: boolean className?: string }) => { return (
{loading ? Children.map(children, (child) => ) : children}
) } export { FormSection, FormSectionContent, FormSectionLabel }