@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.
40 lines (39 loc) • 1.54 kB
JavaScript
"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
exports.__esModule = true;
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _clsx = _interopRequireDefault(require("clsx"));
var _Stack = _interopRequireDefault(require("../../../Stack"));
var _Text = _interopRequireDefault(require("../../../Text"));
var _consts = require("../../consts");
const SeatLegend = ({
type = _consts.TYPES.DEFAULT,
label,
dataTest,
"aria-label": ariaLabel,
id
}) => {
return /*#__PURE__*/React.createElement(_Stack.default, {
inline: true,
align: "center",
spacing: "200"
}, /*#__PURE__*/React.createElement("svg", {
id: id,
width: "16",
height: "20",
viewBox: "0 0 16 20",
fill: "none",
"data-test": dataTest,
"aria-label": ariaLabel
}, /*#__PURE__*/React.createElement("path", {
className: (0, _clsx.default)(type === _consts.TYPES.LEGROOM && "fill-blue-light-active", type === _consts.TYPES.DEFAULT && "fill-product-light-active", type === _consts.TYPES.UNAVAILABLE && "fill-cloud-light-active"),
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"
})), label && /*#__PURE__*/React.createElement(_Text.default, {
type: "secondary",
size: "small"
}, label));
};
var _default = exports.default = SeatLegend;