Add parts

This commit is contained in:
trading_peter 2023-08-09 00:24:41 +02:00
parent 1ec658dfef
commit 3f1c74b951

View File

@ -123,8 +123,8 @@ class TpButton extends EventHelpers(LitElement) {
render() {
return html`
<div class="wrap">
<div class="label">
<div class="wrap" part="wrap">
<div class="label" part="label">
<slot></slot>
</div>
${this.extended ? html`
@ -200,6 +200,10 @@ class TpButton extends EventHelpers(LitElement) {
this.unlisten(this, 'keypress', '_keyPressed');
}
firstUpdated() {
this.listen(this, 'keypress', '_keyPressed');
}
shouldUpdate(changes) {
if (changes.has('submit') && this.submit) {
this.extended = true;