archivo del paquete→ .shtukbase/packages/layout-minimal/test/fixtures/layout-plain/layout.js
test/fixtures/layout-plain/layout.js
18 líneas, 752 B.
El archivo tal como está en el paquete: el código y sus comentarios no se traducen.
- window.Layout = {
- mount(root, { sidebar, panel, page, slot, connect }) {
- const navigation = slot("aside", "shell-sidebar", null, sidebar);
- const settings = slot("aside", "shell-right", null, panel);
- const body = slot("main", "shell-main", null, page);
- const cardHost = slot("div", "layout-card-host", { hidden: true, "data-state": "closed" });
- const shell = slot("div", "shell", { "data-arrangement": "docked" }, navigation, settings, body, cardHost);
- root.append(shell);
- return connect({
- shell, body, cardHost, sidebar: navigation, panel: settings,
- insertLeft(left) {
- const region = slot("aside", "shell-left", null, left);
- body.before(region);
- return region;
- },
- });
- },
- };