Compare commits

...

2 Commits

Author SHA1 Message Date
pk
d4e9235deb Bump version 2023-08-09 00:25:01 +02:00
pk
3f1c74b951 Add parts 2023-08-09 00:24:41 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@tp/tp-button", "name": "@tp/tp-button",
"version": "1.2.0", "version": "1.3.0",
"description": "", "description": "",
"main": "tp-button.js", "main": "tp-button.js",
"scripts": { "scripts": {

View File

@ -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;