UNPKG

@rjsf/mui

Version:

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

29 lines (28 loc) 1.58 kB
import { BoxProps } from '@mui/material/Box'; import { DividerProps } from '@mui/material/Divider'; import { GridProps } from '@mui/material/Grid'; import { TypographyProps } from '@mui/material/Typography'; import { FormContextType, GenericObjectType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; /** Properties available for the `rjsfSlotProps` target of the TitleField. */ export interface TitleFieldMuiProps extends GenericObjectType { /** RJSF-specific slot props for targeting child elements of the TitleField. */ rjsfSlotProps?: { /** Props applied to the `Box` wrapper. */ titleBox?: BoxProps; /** Props applied to the `Divider` element. */ titleDivider?: DividerProps; /** Props applied to the `Typography` element used for the title. */ titleTypography?: TypographyProps; /** Props applied to the `Grid` container used when `optionalDataControl` is present. */ titleGridContainer?: GridProps; /** Props applied to the `Grid` item containing the title. */ titleGridItem?: GridProps; /** Props applied to the `Grid` item containing the `optionalDataControl`. */ titleOptionalDataGridItem?: GridProps; }; } /** The `TitleField` is the template to use to render the title of a field * * @param props - The `TitleFieldProps` for this component */ export default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: TitleFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;