@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.
36 lines (30 loc) • 1.24 kB
TypeScript
// Type definitions for @kiwicom/orbit-components
// Project: http://github.com/kiwicom/orbit
import * as React from "react";
import * as Common from "../common/common";
type Size = "normal" | "large";
type Element = "h2" | "h3" | "h4" | "h5" | "h6";
export interface Props extends Common.Global {
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?: (
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
event: React.SyntheticEvent<HTMLButtonElement>,
param2: { readonly value: string; readonly label: string },
) => void | Promise<void>;
// InputEvent
readonly onChange: Common.Event<React.SyntheticEvent<HTMLInputElement>>;
}
declare const ChoiceGroup: React.ForwardRefRenderFunction<HTMLDivElement, Props>;
export { ChoiceGroup, ChoiceGroup as default };