Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Button.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { ui, val, getIcon } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -18,12 +18,12 @@ export const Button = (props, children) => {
|
||||
|
||||
const iconEl = getIcon(icon);
|
||||
|
||||
return $html("button", {
|
||||
return Tag("button", {
|
||||
...rest,
|
||||
class: ui('btn', className),
|
||||
disabled: () => val(loading) || val(props.disabled),
|
||||
}, () => [
|
||||
val(loading) && $html("span", { class: "loading loading-spinner" }),
|
||||
val(loading) && Tag("span", { class: "loading loading-spinner" }),
|
||||
iconEl,
|
||||
children
|
||||
].filter(Boolean));
|
||||
|
||||
Reference in New Issue
Block a user