forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc-select.d.ts
67 lines (63 loc) · 2.12 KB
/
rc-select.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Type definitions for React Select v5.9.0
// Project: https://github.com/react-component/select
// Definitions by: Denis Tirilis <https://github.com/DenisTirilis>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
declare namespace RcSelect {
import React = __React;
interface SelectProps {
className?: string;
prefixCls?: string;
animation?: string;
transitionName?: string;
choiceTransitionName?: string;
dropdownMatchSelectWidth?: boolean;
dropdownClassName?: string;
dropdownStyle?: { [key: string]: string };
dropdownMenuStyle?: { [key: string]: string };
notFoundContent?: string;
showSearch?: boolean;
allowClear?: boolean;
tags?: boolean;
maxTagTextLength?: number;
combobox?: boolean;
multiple?: boolean;
disabled?: boolean;
filterOption?: boolean;
optionFilterProp?: string;
optionLabelProp?: string;
defaultValue?: string | Array<string>;
value?: string | Array<string>;
onChange?: (value: string, label: string) => void;
onSearch?: Function;
onSelect?: (value: string, ontion: Option) => void;
onDeselect?: Function;
defaultLabel?: string | Array<string>;
defaultActiveFirstOption?: boolean;
getPopupContainer?: (trigger: Node) => Node;
}
export class Select extends React.Component<SelectProps, any> { }
interface OptionProps {
className?: string;
disabled?: boolean;
key?: string;
value?: string;
}
export class Option extends React.Component<OptionProps, any> { }
interface OptGroupProps {
label?: string | React.ReactElement<any>;
key?: string;
value?: string;
}
export class OptGroup extends React.Component<OptGroupProps, any> { }
}
declare module 'rc-select' {
import Select = RcSelect.Select;
import Option = RcSelect.Option;
import OptGroup = RcSelect.OptGroup;
export default Select;
export {
Option,
OptGroup
};
}