This commit is contained in:
2026-03-25 21:02:12 +01:00
parent 0521223b28
commit 43bec4a4a6

View File

@@ -890,13 +890,20 @@ export const UI = ($, defaultLang = "es") => {
/** FIELDSET */ /** FIELDSET */
ui.Fieldset = (props, children) => ui.Fieldset = (props, children) =>
$.html("fieldset", { ...props, class: joinClass("fieldset bg-base-200 border border-base-300 p-4 rounded-lg", props.$class || props.class) }, [ $.html(
ui.If( "fieldset",
() => props.legend, {
() => $.html("legend", { class: "fieldset-legend font-bold" }, props.legend), ...props,
), class: joinClass("fieldset bg-base-200 border border-base-300 p-4 rounded-lg", props.$class || props.class),
},
[
() => {
const legendText = val(props.legend);
return legendText ? $.html("legend", { class: "fieldset-legend font-bold" }, [legendText]) : null;
},
children, children,
]); ],
);
/** STACK */ /** STACK */
ui.Stack = (props, children) => $.html("div", { ...props, class: joinClass("stack", props.$class || props.class) }, children); ui.Stack = (props, children) => $.html("div", { ...props, class: joinClass("stack", props.$class || props.class) }, children);