@rjsf/mui
Version:
Material UI 7 theme, fields and widgets for react-jsonschema-form
24 lines (23 loc) • 1.52 kB
TypeScript
import { GridProps } from '@mui/material/Grid';
import { FormContextType, GenericObjectType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
/** Properties available for the `rjsfSlotProps` target of the ObjectFieldTemplate. */
export interface ObjectFieldTemplateMuiProps extends GenericObjectType {
/** RJSF-specific slot props for targeting child elements of the ObjectFieldTemplate. */
rjsfSlotProps?: {
/** Props applied to the outermost `Grid` container wrapping all object properties. */
objectGridContainer?: GridProps;
/** Props applied to the `Grid` item wrapping each individual object property. */
objectGridItem?: GridProps;
/** Props applied to the wrapper `Grid` container next to the Add Button (when expandable). */
objectAddButtonGridContainer?: GridProps;
/** Props applied to the `Grid` item containing the Add Button. */
objectAddButtonGridItem?: GridProps;
};
}
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
* the properties.
*
* @param props - The `ObjectFieldTemplateProps` for this component
*/
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;