Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Radio.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { val, ui } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -15,7 +15,7 @@ import { val, ui } from "../core/utils.js";
|
||||
export const Radio = (props) => {
|
||||
const { class: className, label, tooltip, value, inputValue, name, ...rest } = props;
|
||||
|
||||
const radioEl = $html("input", {
|
||||
const radioEl = Tag("input", {
|
||||
...rest,
|
||||
type: "radio",
|
||||
name: name,
|
||||
@@ -28,10 +28,10 @@ export const Radio = (props) => {
|
||||
|
||||
if (!label && !tooltip) return radioEl;
|
||||
|
||||
const layout = $html("label", { class: "label cursor-pointer justify-start gap-3" }, [
|
||||
const layout = Tag("label", { class: "label cursor-pointer justify-start gap-3" }, [
|
||||
radioEl,
|
||||
label ? $html("span", { class: "label-text" }, label) : null,
|
||||
label ? Tag("span", { class: "label-text" }, label) : null,
|
||||
]);
|
||||
|
||||
return tooltip ? $html("div", { class: "tooltip", "data-tip": tooltip }, layout) : layout;
|
||||
return tooltip ? Tag("div", { class: "tooltip", "data-tip": tooltip }, layout) : layout;
|
||||
};
|
||||
Reference in New Issue
Block a user