payzli-ui-aryan
Version:
A custom react components library
67 lines (66 loc) • 1.8 kB
TypeScript
export interface ITextField {
type: "text" | "email";
id: string;
value: string | number;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
className: string;
required?: boolean;
formSubmitted: boolean;
name: string;
label: string;
errorMessage?: string;
formClass?: string;
leftIcon?: "search" | "email" | React.ReactNode;
onBlur?: any;
disabled?: boolean;
disableAutoFill?: boolean;
fieldType?: "url";
autoFocus?: boolean;
onClick?: any;
readOnly?: boolean;
disableValidation?: boolean;
placeholder?: string;
inputMode?: "text" | "search" | "email" | "tel" | "url" | "none" | "numeric" | "decimal";
list?: string;
pattern?: string;
minLength?: number;
maxLength?: number;
showMaxLength?: boolean;
tooltip?: string;
hintText?: string;
UiLanguage?: string;
transformPhrase?: any;
ref?: any;
sectionType?: "left" | "right" | "both";
sectionLeftIcon?: React.ReactNode;
sectionRightIcon?: React.ReactNode;
isError?: (err: {
[id: string]: string;
}) => void;
hideMaxLength?: boolean;
}
export interface ITextareaProps {
id: string;
rows: number;
value: string | number;
onChange: any;
className: string;
required: boolean;
formSubmitted: boolean;
name: string;
label: string;
errorMessage?: string;
formClass?: string;
maxLength?: number;
minLength?: number;
onBlur?: any;
disabled?: boolean;
hideMaxLength?: boolean;
maxLengthPos?: "bottom" | "top" | "bottom_left";
placeholder?: string;
customPosClassName?: string;
transformPhrase?: (phrase: string, lang: string, params: any) => string;
UiLanguage?: string;
hintText?: string;
ref?: any;
}