updated code snippet
This commit is contained in:
@@ -4,18 +4,21 @@
|
||||
"scope": "typescript",
|
||||
"body": [
|
||||
"import { UUITextStyles } from '@umbraco-ui/uui-css';",
|
||||
"import { css, html, LitElement } from 'lit';",
|
||||
"import { css, html } from 'lit';",
|
||||
"import { customElement } from 'lit/decorators.js';",
|
||||
"import { UmbLitElement } from '@umbraco-cms/internal/lit-element';",
|
||||
"",
|
||||
"@customElement('umb-${TM_FILENAME_BASE/(.*)\\..+$/$1/}')",
|
||||
"export class Umb${TM_FILENAME_BASE/(.*)\\..+$/${1:/pascalcase}/}Element extends LitElement {",
|
||||
"\tstatic styles = [UUITextStyles, css``];",
|
||||
"",
|
||||
"export class Umb${TM_FILENAME_BASE/(.*)\\..+$/${1:/pascalcase}/}Element extends UmbLitElement {",
|
||||
"\trender() {",
|
||||
"\t\treturn html`${0:umb-${TM_FILENAME_BASE/(.*)\\..+$/$1/}}`;",
|
||||
"\t}",
|
||||
"",
|
||||
"\tstatic styles = [UUITextStyles, css``];",
|
||||
"}",
|
||||
"",
|
||||
"export default Umb${TM_FILENAME_BASE/(.*)\\..+$/${1:/pascalcase}/}Element",
|
||||
"",
|
||||
"declare global {",
|
||||
"\tinterface HTMLElementTagNameMap {",
|
||||
"\t\t'umb-${TM_FILENAME_BASE/(.*)\\..+$/$1/}': Umb${TM_FILENAME_BASE/(.*)\\..+$/${1:/pascalcase}/}Element;",
|
||||
|
||||
Reference in New Issue
Block a user