@wener/console
Version:
Base console UI toolkit
35 lines (33 loc) • 1.26 kB
JavaScript
import React from "react";
import { IconSidebarLayout } from "../../../components/IconSidebarLayout/IconSidebarLayout.js";
import { WindowDock } from "../../../window/WindowDock.js";
(function (ConsoleLayout) {
ConsoleLayout.Composite = function (param) {
var children = param.children, _param_dock = param.dock, dock = _param_dock === void 0 ? true : _param_dock, menu = param.menu;
/*
Icon Menu | Content | Dock
Icon Menu
Top
Content
Bottom
*/ var content = children;
if (!dock) {
// disable
}
else if (dock === true) {
content = /*#__PURE__*/ React.createElement(WindowDock.Layout, null, children);
}
else if ( /*#__PURE__*/React.isValidElement(dock)) {
content = /*#__PURE__*/ React.createElement(WindowDock.Layout, {
dock: dock
}, children);
}
else {
content = /*#__PURE__*/ React.createElement(WindowDock.Layout, {
dock: /*#__PURE__*/ React.createElement(WindowDock.Dock, dock)
}, children);
}
return /*#__PURE__*/ React.createElement(IconSidebarLayout.Layout, menu, content);
};
})(ConsoleLayout || (ConsoleLayout = {}));
export var ConsoleLayout;