Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Stat.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { val, ui } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -12,10 +12,10 @@ import { val, ui } from "../core/utils.js";
|
||||
export const Stat = (props) => {
|
||||
const { class: className, icon, label, value, desc, ...rest } = props;
|
||||
|
||||
return $html("div", { ...rest, class: ui('stat', className) }, [
|
||||
icon && $html("div", { class: "stat-figure text-secondary" }, icon),
|
||||
label && $html("div", { class: "stat-title" }, label),
|
||||
$html("div", { class: "stat-value" }, () => val(value) ?? value),
|
||||
desc && $html("div", { class: "stat-desc" }, desc),
|
||||
return Tag("div", { ...rest, class: ui('stat', className) }, [
|
||||
icon && Tag("div", { class: "stat-figure text-secondary" }, icon),
|
||||
label && Tag("div", { class: "stat-title" }, label),
|
||||
Tag("div", { class: "stat-value" }, () => val(value) ?? value),
|
||||
desc && Tag("div", { class: "stat-desc" }, desc),
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user