/
index.d.ts
44 lines (36 loc) · 1.2 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
import type * as React from "react";
import { ViewStyle, TextStyle } from "react-native";
export type IOptionValue = any;
export type IOptionLabel = string;
interface IOption {
value: IOptionValue;
label: IOptionLabel;
disabled?: boolean;
}
interface DefaultSelectProps {
options: IOption[];
openButtonContent?: string | React.ReactNode;
openButtonStyle?: ViewStyle;
openButtonTextStyle?: TextStyle;
closeButtonContent?: string | React.ReactNode;
closeButtonStyle?: ViewStyle;
closeButtonTextStyle?: TextStyle;
itemStyle?: ViewStyle;
labelStyle?: TextStyle;
modalStyle?: ViewStyle;
selectedValueStyle?: TextStyle;
selectedText?: string;
placeholder?: string;
searchRequiredText?: string;
}
export interface SelectListProps extends DefaultSelectProps {
value: IOptionValue;
onChange: (value: IOptionValue) => any;
}
export interface MultiSelectListProps extends DefaultSelectProps {
value: IOptionValue[];
onChange: (value: IOptionValue[]) => any;
}
declare class MultiSelectList extends React.Component<MultiSelectListProps> {}
declare class SelectList extends React.Component<SelectListProps> {}
export { MultiSelectList, SelectList };