UNPKG

lucid-ui

Version:

A UI component library from Xandr.

81 lines 2.62 kB
import React from 'react'; import PropTypes from 'prop-types'; import { IValidationProps } from '../Validation/Validation'; import { ITextFieldPropsWithPassThroughs } from '../TextField/TextField'; export interface ITextFieldValidatedErrorProps extends IValidationProps { description?: string; } export interface ITextFieldValidatedProps extends ITextFieldPropsWithPassThroughs { Error?: React.ReactNode; Info?: string; Success?: { message: string; disappearing?: boolean; }; } export interface ITextFieldValidatedState { value: string | number; } declare class TextFieldValidated extends React.Component<ITextFieldValidatedProps, ITextFieldValidatedState> { static displayName: string; static Error: { (_props: ITextFieldValidatedErrorProps): null; displayName: string; peek: { description: string; }; propName: string; }; static peek: { description: string; categories: string[]; }; static reducers: { onChange: typeof import("../TextField/TextField.reducers").onChange; }; static propTypes: { /** Passed to the root container. */ style: PropTypes.Requireable<object>; /** Passed to the root container. */ className: PropTypes.Requireable<string>; /** Prop alternative to Error child component */ Error: PropTypes.Requireable<any>; /** Optional information text that is styled less aggressively than an error */ Info: PropTypes.Requireable<string>; /** Optional information text that is styled as "success". Also contains `disappearing` prop for message that appears and fades away. */ Success: PropTypes.Requireable<PropTypes.InferProps<{ message: PropTypes.Requireable<string>; disappearing: PropTypes.Requireable<boolean>; }>>; }; static defaultProps: { style: undefined; isDisabled: boolean; isMultiLine: boolean; onBlur: (...args: any[]) => void; onChange: (...args: any[]) => void; onChangeDebounced: (...args: any[]) => void; onSubmit: (...args: any[]) => void; onKeyDown: (...args: any[]) => void; rows: number; debounceLevel: number; lazyLevel: number; value: string; }; private textFieldRef; focus: () => void; render(): JSX.Element; } export default TextFieldValidated; //# sourceMappingURL=TextFieldValidated.d.ts.map