Docs Updated

This commit is contained in:
2026-04-03 01:41:07 +02:00
parent b0629ef3d0
commit 257107e198
42 changed files with 1529 additions and 6255 deletions

View File

@@ -12,8 +12,17 @@ import { ui } from "../core/utils.js";
* - badge-outline, badge-soft, badge-dash
* - badge-xs, badge-sm, badge-md, badge-lg
*/
export const Indicator = (props, children) =>
$html("div", { class: "indicator" }, () => [
children,
props.value && $html("span", { class: ui('indicator-item badge', props.class) }, props.value),
].filter(Boolean));
export const Indicator = (props, children) => {
const { value, class: className, ...rest } = props;
return $html("div", {
...rest,
class: "indicator"
}, () => [
// El indicador debe ir PRIMERO (antes que el children)
value ? $html("span", {
class: ui('indicator-item badge', className)
}, () => typeof value === "function" ? value() : value) : null,
children
].filter(Boolean));
};