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) 1.06 kB
// Type definitions for @kiwicom/orbit-components // Project: http://github.com/kiwicom/orbit import type * as React from "react"; import type * as Common from "../common/types"; export type Size = "normal" | "large"; type Element = "h2" | "h3" | "h4" | "h5" | "h6"; export interface Props extends Common.Globals { readonly children: | React.ReactNode | ((args: { readonly Container: "div"; readonly Item: React.ComponentType<{ readonly children: React.ReactNode }>; readonly spacing: string; }) => React.ReactNode); readonly label?: Common.Translation; readonly labelSize?: Size; readonly labelAs?: Element; readonly error?: Common.Translation; readonly onlySelectionText?: Common.Translation; readonly filter?: boolean; readonly onOnlySelection?: ( event: React.SyntheticEvent<HTMLButtonElement | HTMLAnchorElement>, param2: { readonly value: string; readonly label: string }, ) => void | Promise<void>; // InputEvent readonly onChange: Common.Event<React.ChangeEvent<HTMLInputElement>>; }