Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Accordion.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { ui, val } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -14,16 +14,16 @@ import { ui, val } from "../core/utils.js";
|
||||
export const Accordion = (props, children) => {
|
||||
const { class: className, title, name, open, ...rest } = props;
|
||||
|
||||
return $html("div", {
|
||||
return Tag("div", {
|
||||
...rest,
|
||||
class: ui('collapse collapse-arrow bg-base-200 mb-2', className),
|
||||
}, [
|
||||
$html("input", {
|
||||
Tag("input", {
|
||||
type: name ? "radio" : "checkbox",
|
||||
name: name,
|
||||
checked: val(open),
|
||||
}),
|
||||
$html("div", { class: "collapse-title text-xl font-medium" }, title),
|
||||
$html("div", { class: "collapse-content" }, children),
|
||||
Tag("div", { class: "collapse-title text-xl font-medium" }, title),
|
||||
Tag("div", { class: "collapse-content" }, children),
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user