UNPKG

@uva-glass/component-library

Version:

React components UvA

18 lines (17 loc) 974 B
import { InputHTMLAttributes, ReactNode } from 'react'; export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> { /** The variant to render. Possible values: `undefined`, `large`. The default is `undefined`. */ variant?: 'large'; /** The width to render. Possible values: `undefined`, `compact`. The default is `undefined`. */ width?: 'compact'; /** The type of the input element. */ type?: 'text' | 'password' | 'email'; /** The id of the input element. */ id: string; /** An element that represents a clear button. */ clearTrigger?: ReactNode; /** 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>>;