Migrating new components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s

This commit is contained in:
2026-04-20 23:31:14 +02:00
parent 6fc32614b1
commit d900659d88
59 changed files with 1824 additions and 1554 deletions

27
components/Stat.js Normal file
View File

@@ -0,0 +1,27 @@
// components/Stats.js
import { Tag } from "sigpro";
export const Stats = (props, children) => {
const { class: className, vertical = false, ...rest } = props;
const direction = vertical ? "stats-vertical" : "stats-horizontal";
return Tag("div", {
...rest,
class: `stats ${direction} ${className || ''}`.trim()
}, children);
};
export const Stat = (props) => {
const { class: className, label, value, desc, icon, actions, children, ...rest } = props;
if (children !== undefined) {
return Tag("div", { ...rest, class: `stat ${className || ''}`.trim() }, children);
}
return Tag("div", { ...rest, class: `stat ${className || ''}`.trim() }, [
icon && Tag("div", { class: "stat-figure" }, icon),
label && Tag("div", { class: "stat-title" }, label),
value && Tag("div", { class: "stat-value" }, value),
desc && Tag("div", { class: "stat-desc" }, desc),
actions && Tag("div", { class: "stat-actions" }, actions)
]);
};