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.

48 lines (47 loc) 1.5 kB
"use strict"; "use client"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; exports.__esModule = true; exports.default = void 0; var React = _interopRequireWildcard(require("react")); /** * @orbit-doc-start * README * ---------- * # Coupon * * To implement Coupon component into your project you'll need to add the import: * * ```jsx * import Coupon from "@kiwicom/orbit-components/lib/Coupon"; * ``` * * After adding import into your project you can use it simply like: * * ```jsx * <Coupon>PromotionCode</Coupon> * ``` * * ## Props * * Table below contains all types of the props available in the Coupon component. * * | Name | Type | Default | Description | * | :----------- | :----------- | :------ | :---------------------------------- | * | dataTest | `string` | | Optional prop for testing purposes. | * | id | `string` | | Set `id` for `Coupon` | * | **children** | `React.Node` | | The content of the Coupon. | * * * @orbit-doc-end */ const Coupon = ({ children, dataTest, id }) => /*#__PURE__*/React.createElement("mark", { className: "orbit-coupon text-small border-cloud-dark py-50 px-100 rounded-100 text-ink-dark inline border border-dashed bg-transparent font-medium uppercase tracking-[0.75px]", "data-test": dataTest, id: id }, children); var _default = exports.default = Coupon;