Add catalog package
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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>`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user