import * as React from 'react'; import { PropTypes } from '..'; import { OverridableComponent, OverrideProps } from '../OverridableComponent'; export interface FormControlTypeMap

{ props: P & { color?: 'primary' | 'secondary'; disabled?: boolean; error?: boolean; fullWidth?: boolean; hiddenLabel?: boolean; margin?: PropTypes.Margin; required?: boolean; size?: 'small' | 'medium'; variant?: 'standard' | 'outlined' | 'filled'; }; defaultComponent: D; classKey: FormControlClassKey; } /** * Provides context such as filled/focused/error/required for form inputs. * Relying on the context provides high flexibility and ensures that the state always stays * consistent across the children of the `FormControl`. * This context is used by the following components: * * - FormLabel * - FormHelperText * - Input * - InputLabel * * You can find one composition example below and more going to [the demos](https://material-ui.com/components/text-fields/#components). * * ```jsx * * Email address * * We'll never share your email. * * ``` * * ⚠️Only one input can be used within a FormControl. * Demos: * * - [Checkboxes](https://material-ui.com/components/checkboxes/) * - [Radio Buttons](https://material-ui.com/components/radio-buttons/) * - [Switches](https://material-ui.com/components/switches/) * - [Text Fields](https://material-ui.com/components/text-fields/) * * API: * * - [FormControl API](https://material-ui.com/api/form-control/) */ declare const FormControl: OverridableComponent; export type FormControlClassKey = 'root' | 'marginNormal' | 'marginDense' | 'fullWidth'; export type FormControlProps< D extends React.ElementType = FormControlTypeMap['defaultComponent'], P = {} > = OverrideProps, D>; export default FormControl;