UNPKG

@1771technologies/lytenyte-pro

Version:

19 lines (18 loc) 707 B
import { jsxs, jsx } from "react/jsx-runtime"; import { useMemo } from "react"; function GridContainer({ top, bottom, children }) { const template = useMemo(() => { if (top && bottom) return "auto 1fr auto"; if (top) return "auto 1fr"; if (bottom) return "1fr auto"; return "1fr"; }, [bottom, top]); return /* @__PURE__ */ jsxs("div", { className: "lng1771-grid-container", style: { gridTemplateRows: template }, children: [ top && /* @__PURE__ */ jsx("div", { className: "lng1771-grid-container__top", children: top }), children, bottom && /* @__PURE__ */ jsx("div", { className: "lng1771-grid-container__bottom", children: bottom }) ] }); } export { GridContainer };