@coko/client
Version:
Client side common code for coko apps
52 lines (47 loc) • 1.21 kB
JavaScript
import { fadeIn as e } from "../toolkit/styles/fadeInOut.js";
import { grid as t, th as n } from "../toolkit/themeHelper.js";
import "../toolkit/index.js";
import r, { createGlobalStyle as i, css as a } from "styled-components";
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
//#region src/components/PageLayout.tsx
var l = i`
html {
height: 100%;
}
body {
height: 100vh;
overflow: hidden;
}
#root {
height: 100%;
}
`, u = r.div`
display: flex;
flex-direction: column;
height: 100%;
`, d = a`
animation: ${e} 0.5s;
`, f = a`
padding: ${t(2)} ${t(2)} 50px ${t(2)};
`, p = r.div`
flex: auto;
font-family: ${n("fontInterface")};
height: 100%;
overflow-y: auto;
${(e) => e.$padPages && f}
> div {
${(e) => e.$fadeInPages && d}
}
`, m = ({ children: e, className: t, fadeInPages: n = !0, padPages: r = !0, navComponent: i = null }) => {
let a = i;
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(l, {}), /* @__PURE__ */ c(u, {
className: t,
children: [a && /* @__PURE__ */ s(a, {}), /* @__PURE__ */ s(p, {
$fadeInPages: n,
$padPages: r,
children: e
})]
})] });
};
//#endregion
export { m as default };