UNPKG

710 BTypeScriptView Raw
1import * as React from 'react';
2import type { FormControlProps } from './FormControl';
3type ContextFromPropsKey = 'color' | 'disabled' | 'error' | 'fullWidth' | 'hiddenLabel' | 'margin' | 'onBlur' | 'onFocus' | 'required' | 'size' | 'variant';
4export interface FormControlState extends Pick<FormControlProps, ContextFromPropsKey> {
5 adornedStart: boolean;
6 filled: boolean;
7 focused: boolean;
8 onEmpty: () => void;
9 onFilled: () => void;
10 registerEffect: () => void;
11 setAdornedStart: React.Dispatch<React.SetStateAction<boolean>>;
12}
13/**
14 * @ignore - internal component.
15 */
16declare const FormControlContext: React.Context<FormControlState | undefined>;
17export default FormControlContext;