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

This commit is contained in:
2026-04-22 12:06:34 +02:00
parent 5a5f593025
commit 59e6d972a8
125 changed files with 1934 additions and 2015 deletions

View File

@@ -1,29 +1,29 @@
// components/Drawer.js
import { Tag } from "sigpro";
import { h } from "sigpro";
export const Drawer = (props, children) => {
children === undefined && (children = props, props = {});
return Tag("div", { ...props, class: `drawer ${props.class ?? ''}` }, children);
return h("div", { ...props, class: `drawer ${props.class ?? ''}` }, children);
};
export const Sidebar = (props) => {
const id = props.id || `drawer-${Math.random().toString(36).slice(2, 9)}`;
return Tag("div", { ...props, class: `drawer ${props.class ?? ''}` }, [
Tag("input", {
return h("div", { ...props, class: `drawer ${props.class ?? ''}` }, [
h("input", {
id,
type: "checkbox",
class: "drawer-toggle",
checked: () => (typeof props.open === "function" ? props.open() : props.open),
onchange: (e) => typeof props.open === "function" && props.open(e.target.checked)
}),
Tag("div", { class: "drawer-content" }, props.children),
Tag("div", { class: "drawer-side" }, [
Tag("label", {
h("div", { class: "drawer-content" }, props.children),
h("div", { class: "drawer-side" }, [
h("label", {
for: id,
class: "drawer-overlay",
onclick: () => typeof props.open === "function" && props.open(false)
}),
Tag("div", { class: "min-h-full bg-base-200 w-80 p-4" },
h("div", { class: "min-h-full bg-base-200 w-80 p-4" },
typeof props.content === "function" ? props.content() : props.content
)
])