UNPKG

@rjsf/mui

Version:

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

23 lines (22 loc) 1.28 kB
import { FormControlLabelProps } from '@mui/material/FormControlLabel'; import { RadioProps } from '@mui/material/Radio'; import { RadioGroupProps } from '@mui/material/RadioGroup'; import { FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils'; /** Properties available for the `rjsfSlotProps` target of the RadioWidget. */ export interface RadioWidgetMuiProps extends GenericObjectType { /** RJSF-specific slot props for targeting child elements of the RadioWidget. */ rjsfSlotProps?: { /** Props applied to the `RadioGroup` component. */ radioGroup?: RadioGroupProps; /** Props applied to the individual `Radio` components. */ radio?: RadioProps; /** Props applied to the `FormControlLabel` components wrapping each radio button. */ formControlLabel?: FormControlLabelProps; }; } /** The `RadioWidget` is a widget for rendering a radio group. * It is typically used with a string property constrained with enum options. * * @param props - The `WidgetProps` for this component */ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;