@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) • 1.12 kB
JavaScript
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";
var SeatLegend = function SeatLegend(_ref) {
var _ref$type = _ref.type,
type = _ref$type === void 0 ? TYPES.DEFAULT : _ref$type,
label = _ref.label,
dataTest = _ref.dataTest;
var 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: type,
theme: theme
})
})), label && /*#__PURE__*/React.createElement(Text, {
type: "secondary",
size: "small"
}, label));
};
export default SeatLegend;