forked from iulianraduat/react-select-material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
47 lines (34 loc) · 1.56 KB
/
index.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
import * as React from 'react';
import { BaseTextFieldProps } from '@material-ui/core/TextField';
import { Props as ReactSelectProps } from 'react-select/lib/Select';
export interface SelectOption {
label: string;
value: any;
}
export interface SelectProps extends ReactSelectProps<SelectOption> {
isCreatable?: boolean;
msgNoOptionsAvailable?: string;
msgNoOptionsMatchFilter?: string;
msgNoValidValue?: string;
}
export interface ReactSelectMaterialUiProps extends React.Props<ReactSelectMaterialUi>, Omit<BaseTextFieldProps, 'onChange'> {
defaltValue?: any;
defaultValues?: any[];
options: string[] | SelectOption[];
onChange: (value: any | any[], option?: SelectOption | SelectOption[]) => void;
ref?: any;
SelectProps?: SelectProps | any;
value?: any;
values?: any[];
}
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>
declare class ReactSelectMaterialUi extends React.Component<ReactSelectMaterialUiProps> {}
declare class SingleSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare class MultipleSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare class TagSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare class TagsSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare class ColorSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare class ColorsSelect extends React.Component<ReactSelectMaterialUiProps> {}
declare module 'react-select-material-ui' {}
export default ReactSelectMaterialUi;
export { SingleSelect, MultipleSelect, TagSelect, TagsSelect, ColorSelect, ColorsSelect };