import type { BoxProps } from '@mui/material/Box'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; // ---------------------------------------------------------------------- type FormHeadProps = BoxProps & { icon?: React.ReactNode; title: React.ReactNode; description?: React.ReactNode; }; export function FormHead({ sx, icon, title, description, ...other }: FormHeadProps) { return ( <> {icon && ( {icon} )} ({ mb: 5, gap: 1.5, display: 'flex', textAlign: 'center', whiteSpace: 'pre-line', flexDirection: 'column', }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > {title} {description && ( {description} )} ); }