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.

37 lines (31 loc) 970 B
// @flow /* DOCUMENTATION: https://orbit.kiwi/components/choicegroup/ */ import * as React from "react"; import type { Globals, Translation } from "../common/common.js.flow"; type LabelSize = "normal" | "large"; type LabelAs = "h2" | "h3" | "h4" | "h5" | "h6"; export type Filters = {| label: string, value: string |}; export type Props = {| ...Globals, children: | React.Node | (({| Container: "div", Item: React.ComponentType<{| children: React.Node |}>, spacing: string, |}) => React.Node), label?: Translation, labelSize?: LabelSize, labelAs?: LabelAs, error?: Translation, onlySelectionText?: Translation, filter?: boolean, onOnlySelection?: ( SyntheticEvent<HTMLButtonElement>, {| value: string, label: string |}, ) => void | Promise<any>, onChange: (SyntheticInputEvent<HTMLInputElement>) => void | Promise<any>, |}; declare export default React.AbstractComponent<Props, HTMLDivElement>;