analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
62 lines (60 loc) • 1.8 kB
JavaScript
import {
PageContainer
} from "./chunk-GNLZTQRR.mjs";
import {
MenuItem,
MenuOverflow
} from "./chunk-WI3GQX74.mjs";
// src/components/AppLayout/AppLayout.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var AppLayout = ({
header,
menuItems,
activeMenuValue,
onMenuItemClick,
menuMaxWidth,
contentMaxWidth,
children,
bottomSlot
}) => {
const visibleItems = menuItems.filter((item) => item.visible !== false);
return /* @__PURE__ */ jsxs(
"div",
{
"data-component": "AppLayout",
className: "w-screen min-h-[100dvh] md:h-[100dvh] bg-secondary-50 flex flex-col items-center overflow-x-hidden md:overflow-hidden",
children: [
header,
/* @__PURE__ */ jsx("div", { className: "z-10 w-full flex flex-col items-center bg-background shadow-soft-shadow-1", children: /* @__PURE__ */ jsx(
MenuOverflow,
{
value: activeMenuValue,
defaultValue: "",
className: menuMaxWidth ?? "max-w-[1000px]",
onValueChange: onMenuItemClick,
children: visibleItems.map((item) => /* @__PURE__ */ jsxs(
MenuItem,
{
variant: "menu-overflow-col",
value: item.value,
children: [
item.icon,
item.label
]
},
item.value
))
}
) }),
/* @__PURE__ */ jsx("div", { className: "md:[height:calc(100dvh-120px)] md:overflow-auto w-full", children: /* @__PURE__ */ jsx(PageContainer, { innerClassName: contentMaxWidth, children }) }),
bottomSlot
]
}
);
};
var AppLayout_default = AppLayout;
export {
AppLayout,
AppLayout_default
};
//# sourceMappingURL=chunk-KE77J5B4.mjs.map