UNPKG

hh-ui-components

Version:
21 lines 1.58 kB
"use strict"; exports.__esModule = true; exports.Bag = void 0; var tslib_1 = require("tslib"); var react_1 = tslib_1.__importDefault(require("react")); var icons_1 = require("../../../icons/icons"); var Bag = function (_a) { var LineItemsCount = _a.LineItemsCount, BagTitle = _a.BagTitle, onClick = _a.onClick; return (react_1["default"].createElement("div", { className: "relative" }, react_1["default"].createElement("label", { "aria-label": "Bag", onClick: onClick, className: "nav hidden cursor-pointer text-[0.875rem] font-normal md:hidden lg:block 2xl:block 2xl:text-[0.972vw] text-graphite" }, BagTitle, " [", LineItemsCount > 0 ? LineItemsCount : 0, "]"), react_1["default"].createElement("label", { className: "rr relative py-[8px] md:py-[0.938vw] block cursor-pointer lg:hidden", onClick: onClick }, react_1["default"].createElement("svg", { className: "h-[1.125rem] w-[1.125rem] md:h-[2.344vw] md:w-[2.344vw] 2xl:h-[1.250vw] 2xl:w-[1.250vw]", xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", viewBox: "0 0 17 18", fill: "none", role: "img", "aria-label": "Bag icon" }, icons_1.icons.bag), LineItemsCount > 0 ? (react_1["default"].createElement("span", { className: "absolute top-0 right-0 w-[18px] h-[18px] bg-quaternary text-body-text rounded-full text-graphite flex items-center justify-center" }, "".concat(LineItemsCount > 0 ? LineItemsCount : 0))) : null))); }; exports.Bag = Bag; exports["default"] = exports.Bag; //# sourceMappingURL=Bag.js.map