UNPKG

@ozen-ui/kit

Version:

React component library

19 lines (18 loc) 744 B
import type { Dispatch, SetStateAction } from 'react'; import React from 'react'; import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant'; export type FieldControlContextValue = { size?: FormElementSizeVariant; error?: boolean; disabled?: boolean; required?: boolean; fullWidth?: boolean; filled?: boolean; focused?: boolean; hovered?: boolean; label?: string; disableStroke?: boolean; value?: string | number; }; export declare const FieldControlContext: React.Context<[FieldControlContextValue, Dispatch<SetStateAction<FieldControlContextValue>>]>; export declare const useFieldControl: () => [FieldControlContextValue, Dispatch<SetStateAction<FieldControlContextValue>>];