Rebuild all components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
This commit is contained in:
@@ -2,20 +2,6 @@
|
||||
import { Tag } from "sigpro";
|
||||
|
||||
export const Collapse = (props, children) => {
|
||||
const { class: className, open, ...rest } = props;
|
||||
|
||||
return Tag("div", {
|
||||
...rest,
|
||||
class: `collapse ${className || ''}`.trim(),
|
||||
tabindex: 0
|
||||
}, [
|
||||
Tag("input", {
|
||||
type: "checkbox",
|
||||
checked: () => typeof open === "function" ? open() : open,
|
||||
onchange: (e) => {
|
||||
if (typeof open === "function") open(e.target.checked);
|
||||
}
|
||||
}),
|
||||
...(Array.isArray(children) ? children : [children])
|
||||
]);
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `collapse ${props.class ?? ''}` }, children);
|
||||
};
|
||||
Reference in New Issue
Block a user