UNPKG

react-wired-elements

Version:

Wired Elements as React components. TypeScript types included.

38 lines (37 loc) 1.14 kB
import * as React from 'react'; import { BaseProps } from './types'; import { InputType } from './utils/inputTypes'; export interface WiredInputProps extends BaseProps { /** * Placeholder text for the input. */ placeholder?: string; /** * Disable the input. * @default false */ disabled?: boolean; /** * The native input type, i.e. input, email, password. * @default false */ type?: InputType; /** * The value of the input. * @default "text" */ value?: string; /** * Event that fires any time the input text is changed. */ onChange?(e: React.ChangeEvent<HTMLInputElement>): void; /** * Event that fires any time the input is blurred. */ onBlur?(e: React.ChangeEvent<HTMLInputElement>): void; /** * Event that fires any time the input is focused. */ onFocus?(e: React.ChangeEvent<HTMLInputElement>): void; } export declare const WiredInput: ({ placeholder, disabled, type, value, onChange, onBlur, onFocus, className, style, }: WiredInputProps) => JSX.Element;