UNPKG

@uva-glass/component-library

Version:

React components UvA

22 lines (21 loc) 1.06 kB
import { InputHTMLAttributes, ReactNode } from 'react'; export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> { /** The variant to render. */ variant?: 'large'; /** The width to render. */ width?: 'small' | 'compact'; /** The type of the input element. */ type?: 'text' | 'password' | 'email'; /** The background color of the input. InputField is by default transparent. */ background?: 'white'; /** The id of the input element. */ id: string; /** An element that represents a clear button. */ clearTrigger?: ReactNode; /** `true` to color border red to show not valid; otherwise, `false`. */ notValid?: boolean; /** The callback that is invoked when the clear button is triggered. */ onClear?: () => void; } /** Represents a component that renders an input field which can have a clear button. */ export declare const InputField: import('react').ForwardRefExoticComponent<InputFieldProps & import('react').RefAttributes<HTMLInputElement>>;