@rjsf/mui
Version:
Material UI 7 theme, fields and widgets for react-jsonschema-form
22 lines (21 loc) • 1.31 kB
TypeScript
import { ListItemProps } from '@mui/material/ListItem';
import { FormHelperTextProps } from '@mui/material/FormHelperText';
import { ListProps } from '@mui/material/List';
import { FieldErrorProps, FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
/** Properties available for the `rjsfSlotProps` target of the FieldErrorTemplate. */
export interface FieldErrorTemplateMuiProps extends GenericObjectType {
/** RJSF-specific slot props for targeting child elements of the FieldErrorTemplate. */
rjsfSlotProps?: {
/** Props applied to the `List` container holding the errors. */
fieldErrorList?: ListProps;
/** Props applied to each `ListItem` representing an error. */
fieldErrorListItem?: ListItemProps;
/** Props applied to the `FormHelperText` displaying the actual error message. */
fieldErrorFormHelperText?: FormHelperTextProps;
};
}
/** The `FieldErrorTemplate` component renders the errors local to the particular field
*
* @param props - The `FieldErrorProps` for the errors being rendered
*/
export default function FieldErrorTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;