import { dataTheme } from "data-theme"; import { CSSProperties, ReactNode, Ref } from "react"; import { FieldError, FieldErrorsImpl, Merge } from "react-hook-form"; export interface Input extends React.InputHTMLAttributes { /**Placeholder text for the input */ placeholder: string; /** * Custom css class name. */ inputClassName?: string; /** * Custom css class name for group wrapper. */ classNameGroup?: string; /** * Data theme for the html. `${themes}` */ paletteTheme?: dataTheme; /** * Error message to show when input has an error. */ error?: { message?: string | false | FieldError | Merge> | undefined; is?: boolean; }; /** * Ref react element to use */ inputRef?: Ref; /** * Style input group wrapper */ styleGroup?: CSSProperties; /** * Sets if input is required or not */ isRequired?: boolean; /** * Add a label to the input */ label?: string; /** * Styles the label of the input */ labelClassName?: string; /** * Add an icon to the right or the left of the input */ icon?: { className?: string; element?: ReactNode; position?: "right" | "left"; }; /** Add custom background color for the input */ backgroundColor?: string; }