UNPKG

puppy-lib-components

Version:

A modern TypeScript React component library with generic UI components and football pickem domain components

73 lines (72 loc) 1.52 kB
import React from 'react'; export interface InputProps { /** * The type of the input */ type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search'; /** * The placeholder text */ placeholder?: string; /** * The value of the input */ value?: string; /** * The default value of the input */ defaultValue?: string; /** * Whether the input is disabled */ disabled?: boolean; /** * Whether the input is required */ required?: boolean; /** * Whether the input is in an error state */ error?: boolean; /** * The size of the input */ size?: 'sm' | 'md' | 'lg'; /** * The label for the input */ label?: string; /** * Helper text to display below the input */ helperText?: string; /** * Error message to display */ errorMessage?: string; /** * Change handler */ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void; /** * Blur handler */ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void; /** * Focus handler */ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void; /** * Additional CSS class name */ className?: string; /** * The name attribute of the input */ name?: string; /** * The id attribute of the input */ id?: string; } export declare const Input: React.FC<InputProps>;