hh-ui-components
Version:
20 lines • 1.94 kB
JavaScript
import React from "react";
var MegaMenuNew = function (_a) {
var item = _a.item, columns = _a.columns, onClick = _a.onClick;
//bannerPath, imgBanner, titleBanner, have to add in props value
return (React.createElement("div", { className: "invisible opacity-0 group-hover:visible group-hover:opacity-100 fixed inset-x-0 w-full bg-primary px-40 2xl:px-40-2xl py-20 2xl:py-20-2xl max-w-full 2xl:min-h-[31.667vw] min-h-[28.5rem] ".concat((item === null || item === void 0 ? void 0 : item.NavDropdownItems) && Array.isArray(item.NavDropdownItems)
? " "
: "bg-transparent invisible") },
React.createElement("div", { className: "flex" }, columns === null || columns === void 0 ? void 0 : columns.map(function (column, index) {
var _a;
return (React.createElement("ul", { key: index, className: "w-[13.403vw] mr-40 2xl:mr-40-2xl last:mr-0 transition-all duration-200 -translate-y-[0px] opacity-0 group-hover:opacity-100 group-hover:translate-y-0" },
React.createElement(React.Fragment, { key: index },
React.createElement("li", { key: index, className: "mb-20 2xl:mb-20-2xl" },
React.createElement("span", { className: "text-body-text-lg 2xl:text-body-text-2xl uppercase mb-20 2xl:mb-20-2xl" }, column.NavDropdownLabel)), (_a = column === null || column === void 0 ? void 0 : column.NavDropdownItemList) === null || _a === void 0 ? void 0 :
_a.map(function (item, index) { return (React.createElement("li", { className: "mb-2 2xl:mb-[0.556vw]", key: index },
React.createElement("a", { className: "hover:underline cursor-pointer", onClick: onClick },
React.createElement("span", { className: "text-body-text-lg 2xl:text-body-text-2xl" }, item.Label)))); }))));
}))));
};
export default MegaMenuNew;
//# sourceMappingURL=MegaMenu.js.map