Docs Updated
This commit is contained in:
@@ -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));
|
||||
};
|
||||
Reference in New Issue
Block a user