stackpress
Version:
Incept is a content management framework.
16 lines (15 loc) • 1.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = LayoutLeft;
const jsx_runtime_1 = require("react/jsx-runtime");
function LayoutLeft(props) {
const { brand, base, logo, head, open, toggle, children } = props;
const classNames = ['layout-left'];
if (head) {
classNames.push('head');
}
if (open) {
classNames.push('open');
}
return ((0, jsx_runtime_1.jsxs)("aside", { className: classNames.join(' '), children: [(0, jsx_runtime_1.jsxs)("header", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "brand", children: base ? ((0, jsx_runtime_1.jsxs)("a", { href: base, children: [logo && (0, jsx_runtime_1.jsx)("img", { src: logo, alt: brand, className: "logo" }), brand && (0, jsx_runtime_1.jsx)("span", { className: "label", children: brand })] })) : ((0, jsx_runtime_1.jsxs)("span", { children: [logo && (0, jsx_runtime_1.jsx)("img", { src: logo, alt: brand, className: "logo" }), brand && (0, jsx_runtime_1.jsx)("span", { className: "label", children: brand })] })) }), (0, jsx_runtime_1.jsx)("button", { className: "back", onClick: toggle, children: (0, jsx_runtime_1.jsx)("i", { className: "fas fa-chevron-left" }) })] }), (0, jsx_runtime_1.jsx)("main", { children: children })] }));
}