/
index.js.flow
47 lines (42 loc) · 1.34 KB
/
index.js.flow
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
// @flow
/*
DOCUMENTATION: https://orbit.kiwi/components/select/
*/
import * as React from "react";
import type { StyledComponent } from "styled-components";
import type { Globals, Translation, TranslationString, DataAttrs } from "../common/common.js.flow";
import type { spaceAfter } from "../common/getSpacingToken/index.js.flow";
type Option = {|
+key?: string,
+value: string | number,
+label?: string,
+disabled?: boolean,
|};
export type Props = {|
...Globals,
...spaceAfter,
...DataAttrs,
+id?: string,
+required?: boolean,
+label?: Translation,
+placeholder?: TranslationString,
+value?: string | number,
+disabled?: boolean,
+name?: string,
+error?: React.Node,
+width?: string,
+help?: React.Node,
+insideInputGroup?: boolean,
+helpClosable?: boolean,
+tabIndex?: string | number,
+onChange?: (ev: SyntheticInputEvent<HTMLSelectElement>) => void | Promise<any>,
+onFocus?: (ev: SyntheticInputEvent<HTMLSelectElement>) => void | Promise<any>,
+onBlur?: (ev: SyntheticInputEvent<HTMLSelectElement>) => void | Promise<any>,
+options: Option[],
+prefix?: React.Node,
+customValueText?: Translation,
+inlineLabel?: boolean,
+insideInputGroup?: boolean,
|};
declare export var SelectContainer: StyledComponent<any, any, HTMLElement>;
declare export default React.AbstractComponent<Props, HTMLElement>;