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.

36 lines (34 loc) 987 B
import * as React from "react"; import Stack from "../../../Stack"; import Text from "../../../Text"; import useTheme from "../../../hooks/useTheme"; import { resolveAccentColor } from "../helpers"; import { TYPES } from "../../consts"; const SeatLegend = ({ type = TYPES.DEFAULT, label, dataTest }) => { const theme = useTheme(); return /*#__PURE__*/React.createElement(Stack, { inline: true, align: "center", spacing: "XSmall" }, /*#__PURE__*/React.createElement("svg", { width: "16", height: "20", viewBox: "0 0 16 20", fill: "none", "data-test": dataTest }, /*#__PURE__*/React.createElement("path", { d: "M0 3C0 1.34315 1.34315 0 3 0H13C14.6569 0 16 1.34315 16 3V19C16 19.5523 15.5523 20 15 20H1C0.447715 20 0 19.5523 0 19V3Z", fill: resolveAccentColor({ type, theme }) })), label && /*#__PURE__*/React.createElement(Text, { type: "secondary", size: "small" }, label)); }; export default SeatLegend;