UNPKG

welcome-ui

Version:

Customizable design system with react • styled-components • styled-system and ariakit.

18 lines (17 loc) 877 B
import { default as React } from 'react'; import { DefaultFieldStylesProps } from '../../utils/field-styles'; export interface CustomInputOptions { focused: Focused; handleBlur?: (event: React.FocusEvent<HTMLDivElement>) => void; handleFocus?: (event: React.FocusEvent<HTMLDivElement>) => void; icon?: Icon; iconPlacement?: IconPlacement; onReset?: (event: React.MouseEvent<HTMLButtonElement>) => void; size?: DefaultFieldStylesProps['size']; value?: null | string; } export type CustomInputProps = CustomInputOptions & Omit<React.ComponentProps<'input'>, keyof CustomInputOptions>; export type Focused = 'date' | 'time' | null; export type Icon = JSX.Element; export type IconPlacement = 'left' | 'right'; export declare const CustomInput: React.ForwardRefExoticComponent<Omit<CustomInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;