UNPKG

@rjsf/mui

Version:

Material UI 7 theme, fields and widgets for react-jsonschema-form

20 lines (19 loc) 1.23 kB
import { FormControlProps } from '@mui/material/FormControl'; import { TypographyProps } from '@mui/material/Typography'; import { FieldTemplateProps, FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; /** Properties available for the `rjsfSlotProps` target of the FieldTemplate. */ export interface FieldTemplateMuiProps extends GenericObjectType { /** RJSF-specific slot props for targeting child elements of the FieldTemplate. */ rjsfSlotProps?: { /** Props applied to the MUI `FormControl` wrapping the field. */ fieldFormControl?: FormControlProps; /** Props applied to the MUI `Typography` element used for description. */ fieldTypography?: TypographyProps; }; } /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component. * * @param props - The `FieldTemplateProps` for this component */ export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;