UNPKG

mui-rff

Version:

Set of modern wrapper components to facilitate using Material UI with React Final Form

25 lines (24 loc) 1.07 kB
import { FormControlLabelProps, FormControlProps, FormHelperTextProps, FormLabelProps, RadioProps as MuiRadioProps, RadioGroupProps } from '@mui/material'; import { default as React } from 'react'; import { FieldProps } from 'react-final-form'; import { ShowErrorFunc } from './Util'; export interface RadioData { disabled?: boolean; label: string | number | React.ReactElement; value: unknown; } export interface RadiosProps extends Partial<Omit<MuiRadioProps, 'onChange'>> { data: RadioData[]; fieldProps?: Partial<FieldProps<any, any>>; formControlLabelProps?: Partial<FormControlLabelProps>; formControlProps?: Partial<FormControlProps>; formHelperTextProps?: Partial<FormHelperTextProps>; formLabelProps?: Partial<FormLabelProps>; helperText?: React.ReactNode; label?: string | number | React.ReactElement; name: string; radioGroupProps?: Partial<RadioGroupProps>; required?: boolean; showError?: ShowErrorFunc; } export declare function Radios(props: RadiosProps): import("react/jsx-runtime").JSX.Element;