@puzzleitc/puzzle-shell
Version:
The standard design for Puzzle tools
97 lines (84 loc) • 2.69 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";
/**
* Component for the application's footer.
*/
let Footer = class Footer extends LitElement {
render() {
return html `
<div class="named-slots">
<slot name="start"></slot>
<slot name="center"></slot>
<slot name="end"></slot>
</div>
<slot></slot>
`;
}
};
Footer.styles = [
theme,
css `
:host {
padding: calc(var(--pzsh-spacer)) calc(6 * var(--pzsh-spacer));
background-color: var(--pzsh-footer-bg);
display: flex;
flex-direction: column;
align-items: start;
border-top: 2px solid var(--pzsh-footer-border);
}
.named-slots {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: start;
}
::slotted(*) {
color: var(--pzsh-color-gray-4);
font-family: Roboto, sans-serif;
gap: calc(2 * var(--pzsh-spacer));
padding-top: var(--pzsh-spacer);
padding-bottom: var(--pzsh-spacer);
display: flex;
flex-direction: column;
flex: 1;
}
::slotted([slot="start"]) {
align-items: start;
justify-content: flex-start;
}
::slotted([slot="center"]) {
align-items: center;
justify-content: center;
}
::slotted([slot="end"]) {
align-items: end;
justify-content: flex-end;
}
(max-width: ${theme.breakpoint}px) {
:host {
padding: calc(var(--pzsh-spacer)) calc(3 * var(--pzsh-spacer));
}
.named-slots {
flex-direction: column;
row-gap: calc(3 * var(--pzsh-spacer));
}
::slotted([slot="start"]),
::slotted([slot="center"]),
::slotted([slot="end"]) {
align-items: start;
}
}
`,
];
Footer = __decorate([
customElement("pzsh-footer")
], Footer);
export { Footer };