react-web-native-sketch
Version:
[TODO: We need an overview of how this can be used via npm vs as a local package]
53 lines (52 loc) • 1.91 kB
TypeScript
import * as React from 'react';
import { Testable, WithStyles } from '../../';
import { FieldStateProps } from '../../redux/FormComponents/FormComponents.types';
import { TextInputDBValue, TextInputProps } from './TextInput.types';
export declare type Props = TextInputProps & FieldStateProps<TextInputDBValue> & WithStyles & Testable;
export declare class CTextInput extends React.PureComponent<Props, {
focused: boolean;
}> {
_rawValue: string;
constructor(props: Props);
getRawValue(dbValue: TextInputDBValue): string;
getDbValue(rawValue: string): TextInputDBValue;
getError(rawValue: string): string | undefined;
componentWillReceiveProps(nextProps: Props): void;
onBlur(ev: any): void;
onFocus(ev: any): void;
onChange(ev: any): void;
getCommonProps(): {
id: string | undefined;
placeholder: string;
value: string;
onChange: (ev: any) => void;
onBlur: (ev: any) => void;
onFocus: (ev: any) => void;
style: {
display: string;
};
className: string;
} | {
id: string | undefined;
placeholder: string;
value: string;
onChange: (ev: any) => void;
onBlur: (ev: any) => void;
onFocus: (ev: any) => void;
style: {
constructor: Function;
toString(): string;
toLocaleString(): string;
valueOf(): Object;
hasOwnProperty(v: string | number | symbol): boolean;
isPrototypeOf(v: Object): boolean;
propertyIsEnumerable(v: string | number | symbol): boolean;
display: string;
};
className?: undefined;
};
getSingleLineTextInput(): JSX.Element;
getMultilineInput(): JSX.Element;
render(): JSX.Element;
}
export declare const TextInput: React.ComponentType<TextInputProps & FieldStateProps<TextInputDBValue>>;