UNPKG

@kbfront/kb-ui

Version:

KB React UI Library

82 lines (81 loc) 1.91 kB
import { FC, Ref, HTMLAttributes } from "react"; import { EColor } from "../../enum/index"; import "./index.scss"; export declare enum ESwitchSize { XS = "xs", S = "s", M = "m", L = "l" } export declare enum EFormControlType { PASSWORD = "password", CHECKBOX = "checkbox", RADIO = "radio", SEARCH = "search", SWITCH = "switch", EMAIL = "email", TEXT = "text", TEXTAREA = "textarea", DATE = "date", COLOR = "color", HIDDEN = "hidden", NUMBER = "number", TEL = "tel" } interface IDefaultAttributes { name?: string; value?: string; checked?: boolean; defaultChecked?: boolean; max?: string; min?: string; multiple?: boolean; readOnly?: boolean; required?: boolean; maxLength?: number; minLength?: number; length?: number; } export interface IProps extends HTMLAttributes<HTMLElement>, IDefaultAttributes { ref?: Ref<any>; disabled?: boolean; autoComplete?: string; label?: string; className?: string; type?: EFormControlType; color?: EColor; icon?: Array<string> | string; iconPosition?: string; _id?: string; switchSize?: string; switchOff?: string; switchOn?: string; amount?: string; errorText?: string; iconAction?: () => void; phoneMask?: boolean; countryCode?: string; _required?: string; _mask?: string; _number?: string; _min?: string; _max?: string; _password?: string; _passwordrepeat?: string; _strongpassword?: string; _minlength?: string; _maxlength?: string; _length?: string; _email?: string; _amount?: string; _pan?: string; _panbasic?: string; _pin?: string; _formname?: string; _customregex?: string; _resetbtn?: string; _ignore?: string; _phone?: string; } declare const FormControl: FC<IProps>; export default FormControl;