1 | import * as React from 'react';
|
2 | import { InputProps } from './Input';
|
3 | import { SizeType } from '../config-provider/SizeContext';
|
4 | declare const ClearableInputType: ["text", "input"];
|
5 | export declare function hasPrefixSuffix(props: InputProps | ClearableInputProps): boolean;
|
6 |
|
7 |
|
8 |
|
9 | interface BasicProps {
|
10 | prefixCls: string;
|
11 | inputType: typeof ClearableInputType[number];
|
12 | value?: any;
|
13 | allowClear?: boolean;
|
14 | element: React.ReactElement<any>;
|
15 | handleReset: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
16 | className?: string;
|
17 | style?: object;
|
18 | disabled?: boolean;
|
19 | direction?: any;
|
20 | focused?: boolean;
|
21 | readOnly?: boolean;
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 | interface ClearableInputProps extends BasicProps {
|
27 | size?: SizeType;
|
28 | suffix?: React.ReactNode;
|
29 | prefix?: React.ReactNode;
|
30 | addonBefore?: React.ReactNode;
|
31 | addonAfter?: React.ReactNode;
|
32 | triggerFocus: () => void;
|
33 | }
|
34 | declare class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
35 |
|
36 | private containerRef;
|
37 | onInputMouseUp: React.MouseEventHandler;
|
38 | renderClearIcon(prefixCls: string): JSX.Element | null;
|
39 | renderSuffix(prefixCls: string): JSX.Element | null;
|
40 | renderLabeledIcon(prefixCls: string, element: React.ReactElement<any>): JSX.Element;
|
41 | renderInputWithLabel(prefixCls: string, labeledElement: React.ReactElement<any>): JSX.Element;
|
42 | renderTextAreaWithClearIcon(prefixCls: string, element: React.ReactElement<any>): JSX.Element;
|
43 | render(): JSX.Element;
|
44 | }
|
45 | export default ClearableLabeledInput;
|