UNPKG

@rjsf/mui

Version:

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

34 lines (33 loc) 1.92 kB
import { BoxProps } from '@mui/material/Box'; import { ListProps } from '@mui/material/List'; import { ListItemProps } from '@mui/material/ListItem'; import { ListItemIconProps } from '@mui/material/ListItemIcon'; import { ListItemTextProps } from '@mui/material/ListItemText'; import { PaperProps } from '@mui/material/Paper'; import { TypographyProps } from '@mui/material/Typography'; import { ErrorListProps, FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; /** Properties available for the `rjsfSlotProps` target of the ErrorList. */ export interface ErrorListMuiProps extends GenericObjectType { /** RJSF-specific slot props for targeting child elements of the ErrorList. */ rjsfSlotProps?: { /** Props applied to the outermost `Paper` component. */ errorPaper?: PaperProps; /** Props applied to the `Box` container. */ errorBox?: BoxProps; /** Props applied to the `Typography` element for the title. */ errorTypography?: TypographyProps; /** Props applied to the `List` container holding the errors. */ errorList?: ListProps; /** Props applied to each `ListItem` representing an error. */ errorListItem?: ListItemProps; /** Props applied to each `ListItemIcon` representing the error icon. */ errorListItemIcon?: ListItemIconProps; /** Props applied to each `ListItemText` representing the error message. */ errorListItemText?: ListItemTextProps; }; } /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form` * * @param props - The `ErrorListProps` for this component */ export default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, registry, uiSchema, }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;