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.

32 lines (27 loc) 765 B
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/segmentedswitch/ */ import * as React from "react"; import type { Globals } from "../common/common.js.flow"; import type { spaceAfter } from "../common/getSpacingToken/index.js.flow"; export type Option = {| +label: React.Node, +value: string | number, +disabled?: boolean, +defaultChecked?: boolean, +name?: string, |}; export type Props = {| +label?: React.Node, +options: Option[], +showTooltip?: boolean, +onChange: (SyntheticInputEvent<HTMLInputElement>) => void, +onFocus?: (SyntheticInputEvent<HTMLInputElement>) => void, +maxWidth?: string, +help?: React.Node, +error?: React.Node, ...spaceAfter, ...Globals, |}; declare export default React.ComponentType<Props>;