Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Drawer.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { ui } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -14,11 +14,11 @@ export const Drawer = (props, children) => {
|
||||
|
||||
const drawerId = id || `drawer-${Math.random().toString(36).slice(2, 9)}`;
|
||||
|
||||
return $html("div", {
|
||||
return Tag("div", {
|
||||
...rest,
|
||||
class: ui('drawer', className),
|
||||
}, [
|
||||
$html("input", {
|
||||
Tag("input", {
|
||||
id: drawerId,
|
||||
type: "checkbox",
|
||||
class: "drawer-toggle",
|
||||
@@ -27,18 +27,18 @@ export const Drawer = (props, children) => {
|
||||
if (typeof open === "function") open(e.target.checked);
|
||||
}
|
||||
}),
|
||||
$html("div", { class: "drawer-content" }, [
|
||||
Tag("div", { class: "drawer-content" }, [
|
||||
typeof content === "function" ? content() : content
|
||||
]),
|
||||
$html("div", { class: "drawer-side" }, [
|
||||
$html("label", {
|
||||
Tag("div", { class: "drawer-side" }, [
|
||||
Tag("label", {
|
||||
for: drawerId,
|
||||
class: "drawer-overlay",
|
||||
onclick: () => {
|
||||
if (typeof open === "function") open(false);
|
||||
}
|
||||
}),
|
||||
$html("div", { class: "min-h-full bg-base-200 w-80" }, [
|
||||
Tag("div", { class: "min-h-full bg-base-200 w-80" }, [
|
||||
typeof side === "function" ? side() : side
|
||||
])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user