@athosws/react-components
Version:
This is a set of useful ReactJS components developed by Athos.\n Email:ladiesman217.as@gmail.com
62 lines (59 loc) • 1.24 kB
text/typescript
export interface ATHOSInputStyles {
borderColor?: string;
check?: {
borderColor?: string;
centerColor?: string;
};
backgroundColor?: string;
textColor?: string;
iconColor?: string;
hover?: {
backgroundColor?: string;
borderColor?: string;
textColor?: string;
iconColor?: string;
};
focused?: {
backgroundColor?: string;
borderColor?: string;
textColor?: string;
iconColor?: string;
};
disabled?: {
backgroundColor?: string;
borderColor?: string;
textColor?: string;
iconColor?: string;
};
}
export type ATHOSInputType =
| "text"
| "email"
| "user"
| "password"
| "number"
| "tel"
| "url"
| "date"
| "time"
| "color"
| "file"
| "check";
export interface ATHOSInputProps
extends React.InputHTMLAttributes<HTMLInputElement> {
type?: ATHOSInputType;
label?: string;
error?: string;
icon?: React.ReactNode;
colors?: ATHOSInputStyles;
onblur?: () => void | Promise<void>;
onfocus?: () => void | Promise<void>;
onCheck?: (checked: boolean) => void | Promise<void>;
isSubmitting?: boolean;
innerPadding?: {
vertical?: string;
horizontal?: string;
};
inputClassName?: string;
inputWrapperClassName?: string;
}