UNPKG

react-elegant-ui

Version:

Elegant UI components, made by BEM best practices for react

38 lines (37 loc) 1.15 kB
import { FC, ReactElement, ReactNode } from 'react'; import { IComponentHTMLElement, IComponentWithControlProps } from '../../types/IComponent'; import './Textinput.css'; import { ITextinputControl } from './Control/Textinput-Control'; export declare const cnTextinput: import("@bem-react/classname").ClassNameFormatter; export interface ITextinputProps extends Omit<IComponentHTMLElement<HTMLDivElement>, 'onChange'>, IComponentWithControlProps<ITextinputControl>, Pick<ITextinputControl, 'value' | 'onChange' | 'disabled' | 'placeholder' | 'spellCheck'> { /** * Label for input */ hint?: string; setValue?: (value: string) => void; /** * Visual current state */ state?: 'error'; /** * Extension slot */ addonBeforeControl?: ReactNode; /** * Extension slot */ addonAfterControl?: ReactNode; /** * Icon slot */ iconLeft?: ReactElement; /** * Icon slot */ iconRight?: ReactElement; /** * Fire on change value by user input */ onInputText?: (text: string) => void; } export declare const Textinput: FC<ITextinputProps>;