UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

53 lines (46 loc) 1.28 kB
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/select/ */ import * as React from "react"; import type { ReactComponentStyled } from "styled-components"; import type { Globals, Ref, Translation, TranslationString, DataAttrs, } from "../common/common.js.flow"; import type { spaceAfter } from "../common/getSpacingToken/index"; type Option = {| +key?: string, +value: string | number, +label?: string, +disabled?: boolean, |}; type Size = "small" | "normal"; export type Props = {| ...Globals, ...Ref, ...spaceAfter, ...DataAttrs, +id?: string, +required?: boolean, +size?: Size, +label?: Translation, +placeholder?: TranslationString, +value?: string | number, +disabled?: boolean, +name?: string, +error?: React.Node, +help?: React.Node, 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, |}; declare export var SelectContainer: ReactComponentStyled<any>; declare export default React.ComponentType<Props>;