@puzzleitc/puzzle-shell
Version:
The standard design for Puzzle tools
46 lines (45 loc) • 1.53 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { LitElement, css, html } from "lit";
import { customElement } from "lit/decorators/custom-element.js";
import { theme } from "../utils/theme";
/**
* Full height container component that expects to be "slotted" with
* header, content and footer.
*
* @slot - Add header, content and footer in this slot.
*/
let Container = class Container extends LitElement {
render() {
return html ` <slot></slot> `;
}
};
Container.styles = [
theme,
css `
:host {
display: flex;
flex-direction: column;
min-height: 100vh;
}
::slotted(*) {
/* Let the content eat the rest */
flex: auto;
}
::slotted(pzsh-topbar),
::slotted(pzsh-banner),
::slotted(pzsh-hero),
::slotted(pzsh-menu),
::slotted(pzsh-footer) {
flex: none;
}
`,
];
Container = __decorate([
customElement("pzsh-container")
], Container);
export { Container };