import React from "react"; import { Rules } from "../index"; export declare type Styles = { width?: number | string; height?: number | string; indent?: number; backgroundColor?: string; fontSize?: number; border?: string; color?: string; placeholderColor?: string; radius?: number; marginLeft?: number; marginRight?: number; marginTop?: number; marginBottom?: number; margin?: string; paddingLeft?: number; paddingRight?: number; paddingTop?: number; paddingBottom?: number; padding?: string; hover?: Partial<{ backgroundColor?: string; }>; focus?: Partial<{ backgroundColor?: string; borderColor?: string; }>; }; export interface Props { type?: "text" | "password"; className?: string; innerRef?: React.RefObject | null; rules?: Rules[]; validType?: "realtime" | "blur"; error?: string | string[] | null; styles?: Styles; value?: string | number; disabled?: boolean; placeholder?: string | undefined; readOnly?: boolean; onChange?: (e: React.ChangeEvent) => void; onFocus?: () => void; onBlur?: (e: React.SyntheticEvent) => void; keyEnter?: (value: string) => void; onClick?: () => void; } export declare type actions = { type: "value"; value: string; } | { type: "type"; value: string; } | { type: "error"; value: string | string[]; }; export interface State { error: string | string[]; value: string; type: string; } export declare const Input: React.FC;