Updateing Docs

This commit is contained in:
2026-04-02 19:31:39 +02:00
parent 5a77deb442
commit f0c710f8c2
138 changed files with 25729 additions and 3918 deletions

View File

@@ -1,8 +1,20 @@
// components/Dropdown.js
import { $html, $for } from "sigpro";
import { val } from "../core/utils.js";
import { ui } from "../core/utils.js";
/**
* Dropdown component
*
* daisyUI classes used:
* - dropdown, dropdown-content, dropdown-end, dropdown-top, dropdown-bottom
* - menu, menu-dropdown, menu-dropdown-show
* - btn, btn-ghost, btn-sm, btn-md, btn-lg
* - bg-base-100, shadow, rounded-box, border, border-base-300
* - z-50, p-2, w-52, min-w-max
* - m-1, flex, items-center, gap-2
*/
export const Dropdown = (props, children) => {
const { label, icon, items, ...rest } = props;
const { class: className, label, icon, items, ...rest } = props;
const renderContent = () => {
if (items) {
@@ -38,7 +50,7 @@ export const Dropdown = (props, children) => {
return $html("div", {
...rest,
class: () => `dropdown ${val(props.class) || ""}`,
class: ui('dropdown', className),
}, [
$html("div", {
tabindex: 0,