Include name in Radio
This commit is contained in:
@@ -3,11 +3,12 @@ import { val, joinClass } from "../core/utils.js";
|
|||||||
|
|
||||||
/** RADIO */
|
/** RADIO */
|
||||||
export const Radio = (props) => {
|
export const Radio = (props) => {
|
||||||
const { label, tooltip, value, ...rest } = props;
|
const { label, tooltip, value, name, ...rest } = props;
|
||||||
|
|
||||||
const radioEl = $html("input", {
|
const radioEl = $html("input", {
|
||||||
...rest,
|
...rest,
|
||||||
type: "radio",
|
type: "radio",
|
||||||
|
name: name,
|
||||||
class: joinClass("radio", props.class),
|
class: joinClass("radio", props.class),
|
||||||
checked: () => val(value) === props.value,
|
checked: () => val(value) === props.value,
|
||||||
disabled: () => val(props.disabled),
|
disabled: () => val(props.disabled),
|
||||||
|
|||||||
Reference in New Issue
Block a user