@rogieking/figui3 1.0.8 → 1.0.10
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.
- package/fig.js +3 -1
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -910,6 +910,7 @@ class FigCheckbox extends HTMLElement {
|
|
|
910
910
|
super()
|
|
911
911
|
this.input = document.createElement("input")
|
|
912
912
|
this.input.setAttribute("id", uniqueId())
|
|
913
|
+
this.input.setAttribute("name", this.getAttribute("name") || "checkbox")
|
|
913
914
|
this.input.setAttribute("type", "checkbox")
|
|
914
915
|
this.labelElement = document.createElement("label")
|
|
915
916
|
this.labelElement.setAttribute("for", this.input.id)
|
|
@@ -958,7 +959,7 @@ class FigCheckbox extends HTMLElement {
|
|
|
958
959
|
break;
|
|
959
960
|
case "name":
|
|
960
961
|
case "value":
|
|
961
|
-
this.input
|
|
962
|
+
this.input.setAttribute(name, newValue)
|
|
962
963
|
break;
|
|
963
964
|
}
|
|
964
965
|
}
|
|
@@ -977,6 +978,7 @@ class FigRadio extends FigCheckbox {
|
|
|
977
978
|
constructor() {
|
|
978
979
|
super()
|
|
979
980
|
this.input.setAttribute("type", "radio")
|
|
981
|
+
this.input.setAttribute("name", this.getAttribute("name") || "radio")
|
|
980
982
|
}
|
|
981
983
|
}
|
|
982
984
|
window.customElements.define('fig-radio', FigRadio);
|
package/package.json
CHANGED