@rogieking/figui3 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/fig.js +3 -2
  2. package/package.json +1 -1
package/fig.js CHANGED
@@ -18,6 +18,7 @@ class FigButton extends HTMLElement {
18
18
  this.render()
19
19
  }
20
20
  render() {
21
+ this.#type = this.getAttribute("type")
21
22
  this.shadowRoot.innerHTML = `
22
23
  <style>
23
24
  button, button:hover, button:active {
@@ -32,12 +33,11 @@ class FigButton extends HTMLElement {
32
33
  background: transparent;
33
34
  }
34
35
  </style>
35
- <button>
36
+ <button type="${this.#type}">
36
37
  <slot></slot>
37
38
  </button>
38
39
  `;
39
40
  this.#selected = this.hasAttribute("selected") && this.getAttribute("selected") !== "false"
40
- this.#type = this.getAttribute("type")
41
41
  this.button = this.shadowRoot.querySelector('button')
42
42
  this.addEventListener("click", this.handleClick.bind(this))
43
43
  }
@@ -46,6 +46,7 @@ class FigButton extends HTMLElement {
46
46
  }
47
47
  set type(value) {
48
48
  this.#type = value
49
+ this.button.type = value
49
50
  this.setAttribute("type", value)
50
51
  }
51
52
  get selected() {
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.18"
3
+ "version": "1.0.19"
4
4
  }