UNPKG

hh-ui-components

Version:
16 lines 1.35 kB
import React from "react"; import { icons } from "../../../icons/icons"; export var Bag = function (_a) { var LineItemsCount = _a.LineItemsCount, BagTitle = _a.BagTitle, onClick = _a.onClick; return (React.createElement("div", { className: "relative" }, React.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.createElement("label", { className: "rr relative py-[8px] md:py-[0.938vw] block cursor-pointer lg:hidden", onClick: onClick }, React.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.bag), LineItemsCount > 0 ? (React.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))); }; export default Bag; //# sourceMappingURL=Bag.js.map