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.

42 lines 1.51 kB
import * as React from "react"; /** * @orbit-doc-start * README * ---------- * # ButtonGroup * * To implement ButtonGroup component into your project you'll need to add the import: * * ```jsx * import ButtonGroup from "@kiwicom/orbit-components/lib/ButtonGroup"; * ``` * * After adding import into your project you can use it simply like: * * ```jsx * <ButtonGroup> * <Button>Hello</Button> * <Button>World!</Button> * </ButtonGroup> * ``` * * ## Props * * Table below contains all types of the props available in ButtonGroup component. * * | Name | Type | Default | Description | * | :----------- | :----------- | :------ | :--------------------------------------------------------------------- | * | **children** | `React.Node` | | The content of the ButtonGroup, normally **Button** or **ButtonLink**. | * | dataTest | `string` | | Optional prop for testing purposes. | * * * @orbit-doc-end */ const ButtonGroup = ({ children, dataTest }) => /*#__PURE__*/React.createElement("div", { "data-test": dataTest, className: "tb:first:[&>.orbit-button-primitive]:rounded-s-100 tb:last:[&>.orbit-button-primitive]:rounded-e-100 first:[&>.orbit-button-primitive]:rounded-s-150 last:[&>.orbit-button-primitive]:rounded-e-150 flex space-x-px rtl:space-x-reverse [&>.orbit-button-primitive]:rounded-none" }, children); export default ButtonGroup;