react-box-tools
Version:
Box tools react components, utils and hooks
34 lines (25 loc) • 1.08 kB
TypeScript
import { DetailedHTMLProps } from 'react';
import { InputHTMLAttributes } from 'react';
import { SVGProps } from 'react';
declare type ControlBase = {
label?: string;
error?: string;
};
export declare const MultivalueInput: React.FC<MultivalueInputProps>;
export declare type MultivalueInputProps = {
defaultValues?: string[];
onAdd?: (inputValue: string, values: string[]) => void;
validate?: (values: string[]) => Promise<ValidateFieldResult>;
} & Omit<TextBoxProps, "value" | 'type' | 'id' | 'ref' | 'defaultValue' | 'validate'>;
declare type SvgIconProps = SVGProps<SVGSVGElement>;
declare type TextBoxProps = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'type' | 'id' | 'ref'> & {
type?: TextBoxType;
icon?: React.ReactElement<SvgIconProps>;
clearable?: ConstrainBoolean;
} & ControlBase;
declare type TextBoxType = 'text' | 'password' | 'email' | 'number' | 'url' | 'tel';
declare type ValidateFieldResult = {
name: string;
error: string;
};
export { }