UNPKG

mui-rff

Version:

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

26 lines (25 loc) 1.08 kB
import { FormControlProps, FormHelperTextProps, InputLabelProps, MenuItemProps, SelectProps as MuiSelectProps } from '@mui/material'; import { default as React, ReactNode } from 'react'; import { FieldProps } from 'react-final-form'; import { ShowErrorFunc } from './Util'; export interface SelectData { disabled?: boolean; label: string | number | React.ReactElement; value: string | number | string[] | undefined; } export interface SelectProps extends Partial<Omit<MuiSelectProps, 'onChange'>> { children?: ReactNode; data?: SelectData[]; fieldProps?: Partial<FieldProps<any, any>>; formControlProps?: Partial<FormControlProps>; formHelperTextProps?: Partial<FormHelperTextProps>; helperText?: React.ReactNode; inputLabelProps?: Partial<InputLabelProps>; label?: string | number | React.ReactElement; menuItemProps?: Partial<MenuItemProps>; multiple?: boolean; name: string; required?: boolean; showError?: ShowErrorFunc; } export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;