mui-rff
Version:
Set of modern wrapper components to facilitate using Material UI with React Final Form
26 lines (25 loc) • 1.14 kB
TypeScript
import { FormControlLabelProps, FormControlProps, FormGroupProps, FormHelperTextProps, FormLabelProps, CheckboxProps as MuiCheckboxProps } from '@mui/material';
import { default as React } from 'react';
import { FieldProps } from 'react-final-form';
import { ShowErrorFunc } from './Util';
export interface CheckboxData {
disabled?: boolean;
indeterminate?: boolean;
label: string | number | React.ReactElement;
value: unknown;
}
export interface CheckboxesProps extends Partial<Omit<MuiCheckboxProps, 'onChange'>> {
data: CheckboxData | CheckboxData[];
fieldProps?: Partial<FieldProps<any, any>>;
formControlLabelProps?: Partial<FormControlLabelProps>;
formControlProps?: Partial<FormControlProps>;
formGroupProps?: Partial<FormGroupProps>;
formHelperTextProps?: Partial<FormHelperTextProps>;
formLabelProps?: Partial<FormLabelProps>;
helperText?: React.ReactNode;
label?: string | number | React.ReactElement;
name: string;
required?: boolean;
showError?: ShowErrorFunc;
}
export declare function Checkboxes(props: CheckboxesProps): import("react/jsx-runtime").JSX.Element;