| 1 |
import Box from '@mui/material/Box'; |
| 2 |
import Divider from '@mui/material/Divider'; |
| 3 |
import Typography from '@mui/material/Typography'; |
| 4 |
import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; |
| 5 |
|
| 6 |
/** The `TitleField` is the template to use to render the title of a field |
| 7 |
* |
| 8 |
* @param props - The `TitleFieldProps` for this component |
| 9 |
*/ |
| 10 |
export default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ |
| 11 |
id, |
| 12 |
title, |
| 13 |
}: TitleFieldProps<T, S, F>) { |
| 14 |
return ( |
| 15 |
<Box id={id} mb={1} mt={1}> |
| 16 |
<Typography variant='h5'>{title}</Typography> |
| 17 |
<Divider /> |
| 18 |
</Box> |
| 19 |
); |
| 20 |
} |