kopia lustrzana https://github.com/shoelace-style/shoelace
37 wiersze
853 B
Handlebars
37 wiersze
853 B
Handlebars
![]() |
import { LitElement, html, unsafeCSS } from 'lit';
|
||
|
import { customElement, property } from 'lit/decorators.js';
|
||
|
import { event, EventEmitter } from '../../internal/decorators';
|
||
|
import styles from 'sass:./{{ tagWithoutPrefix tag }}.scss';
|
||
|
|
||
|
/**
|
||
|
* @since 2.0
|
||
|
* @status experimental
|
||
|
*
|
||
|
* @dependency sl-example
|
||
|
*
|
||
|
* @slot - The default slot.
|
||
|
* @slot example - An example slot.
|
||
|
*
|
||
|
* @part base - The component's base wrapper.
|
||
|
*/
|
||
|
@customElement('{{ tag }}')
|
||
|
export default class {{ properCase tag }} extends LitElement {
|
||
|
static styles = unsafeCSS(styles);
|
||
|
|
||
|
/** An example property. */
|
||
|
@property() prop = 'example';
|
||
|
|
||
|
/** An example event. */
|
||
|
@event('sl-event') slEvent: EventEmitter<void>;
|
||
|
|
||
|
render() {
|
||
|
return html` <slot></slot> `;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
declare global {
|
||
|
interface HTMLElementTagNameMap {
|
||
|
'{{ tag }}': {{ properCase tag }};
|
||
|
}
|
||
|
}
|