Add parts
This commit is contained in:
parent
1ec658dfef
commit
3f1c74b951
@ -123,8 +123,8 @@ class TpButton extends EventHelpers(LitElement) {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<div class="wrap">
|
<div class="wrap" part="wrap">
|
||||||
<div class="label">
|
<div class="label" part="label">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
${this.extended ? html`
|
${this.extended ? html`
|
||||||
@ -200,6 +200,10 @@ class TpButton extends EventHelpers(LitElement) {
|
|||||||
this.unlisten(this, 'keypress', '_keyPressed');
|
this.unlisten(this, 'keypress', '_keyPressed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
firstUpdated() {
|
||||||
|
this.listen(this, 'keypress', '_keyPressed');
|
||||||
|
}
|
||||||
|
|
||||||
shouldUpdate(changes) {
|
shouldUpdate(changes) {
|
||||||
if (changes.has('submit') && this.submit) {
|
if (changes.has('submit') && this.submit) {
|
||||||
this.extended = true;
|
this.extended = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user