UNPKG

chop-logic-components

Version:

React UI components library for Chop Logic project

18 lines (17 loc) 731 B
import { default as React, ChangeEventHandler } from 'react'; import { ChopLogicRegExpWithFlags, ChopLogicTextInputValidator } from '../../../models'; export declare function useChopLogicTextInputController({ name, defaultValue, onChange, onClear, required, validator, }: { name: string; required: boolean; validator?: ChopLogicRegExpWithFlags | ChopLogicTextInputValidator; defaultValue?: string | number | readonly string[]; onChange?: ChangeEventHandler<HTMLInputElement>; onClear?: () => void; }): { value: string; valid: boolean; passwordShown: boolean; handleChange: (event: React.ChangeEvent<HTMLInputElement>) => void; handleClear: () => void; togglePassword: () => void; };