Follow my own advice and split out content into an overridable sub-template in case we need it

This commit is contained in:
nathan 2022-07-15 09:30:12 -06:00
parent 3d386edbac
commit 2571d90691

View File

@ -95,9 +95,7 @@ export class Et2Tag extends Et2Widget(SlTag)
<span part="prefix" class="tag__prefix">
<slot name="prefix"></slot>
</span>
<span part="content" class="tag__content">
<slot></slot>
</span>
${this._contentTemplate()}
${this.removable
? html`
<sl-icon-button
@ -114,6 +112,14 @@ export class Et2Tag extends Et2Widget(SlTag)
</span>
`;
}
_contentTemplate() : TemplateResult
{
return html`
<span part="content" class="tag__content">
<slot></slot>
</span>`;
}
}
customElements.define("et2-tag", Et2Tag);