Files
sigpro-ui/components/discarted/stat.js
natxocc 910c6ab3c7
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
Before repair nav components
2026-04-25 11:24:39 +02:00

20 lines
867 B
JavaScript

// components/Stats.js
import { h } from "sigpro";
export const Stats = (props, children) => {
children === undefined && (children = props, props = {});
const direction = props.vertical ? "stats-vertical" : "stats-horizontal";
return h("div", { ...props, class: `stats ${direction} ${props.class ?? ''}`.trim() }, children);
};
export const Stat = (props, children) => {
children === undefined && (children = props, props = {});
return h("div", { ...props, class: `stat ${props.class ?? ''}` }, [
props.icon && h("div", { class: "stat-figure" }, props.icon),
props.label && h("div", { class: "stat-title" }, props.label),
props.value && h("div", { class: "stat-value" }, props.value),
props.desc && h("div", { class: "stat-desc" }, props.desc),
props.actions && h("div", { class: "stat-actions" }, props.actions),
children
]);
};