Updateing Docs
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
// components/Indicator.js
|
||||
import { $html } from "sigpro";
|
||||
import { joinClass } from "../core/utils.js";
|
||||
import { ui } from "../core/utils.js";
|
||||
|
||||
/** INDICATOR */
|
||||
/**
|
||||
* Indicator component
|
||||
*
|
||||
* daisyUI classes used:
|
||||
* - indicator, indicator-item
|
||||
* - badge, badge-primary, badge-secondary, badge-accent
|
||||
* - badge-info, badge-success, badge-warning, badge-error
|
||||
* - badge-outline, badge-soft, badge-dash
|
||||
* - badge-xs, badge-sm, badge-md, badge-lg
|
||||
*/
|
||||
export const Indicator = (props, children) =>
|
||||
$html("div", { class: joinClass("indicator", props.class) }, [
|
||||
$html("div", { class: "indicator" }, () => [
|
||||
children,
|
||||
$html("span", { class: joinClass("indicator-item badge", props.badgeClass) }, props.badge),
|
||||
]);
|
||||
props.value && $html("span", { class: ui('indicator-item badge', props.class) }, props.value),
|
||||
].filter(Boolean));
|
||||
Reference in New Issue
Block a user