Files
catalog/ts_web/elements/shx-card.ts
T

38 lines
954 B
TypeScript
Raw Normal View History

2026-05-05 12:03:46 +00:00
import { DeesElement, html, customElement, css } from '@design.estate/dees-element';
import { shxElementStyles } from './tokens.js';
declare global {
interface HTMLElementTagNameMap {
'shx-card': ShxCard;
}
}
@customElement('shx-card')
export class ShxCard extends DeesElement {
public static demo = () => html`<shx-card><strong>Card</strong><p>Reusable panel frame.</p></shx-card>`;
public static demoGroups = ['smarthome.exchange primitives'];
public static styles = [
...shxElementStyles,
css`
:host {
display: block;
}
.card {
border: 1px solid var(--shx-border);
border-radius: var(--shx-radius);
background: var(--shx-card);
box-shadow: 0 16px 50px rgba(0,0,0,0.18);
overflow: hidden;
}
.body {
padding: 18px;
}
`,
];
public render() {
return html`<div class="card"><div class="body"><slot></slot></div></div>`;
}
}