Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/chunks/chunk.62RPJXYJ.js

61 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-01-30 10:59:28 -05:00
import {
badge_styles_default
} from "./chunk.IJRTLEWO.js";
import {
e
} from "./chunk.UZVKBFXH.js";
import {
ShoelaceElement,
n
} from "./chunk.SEXBCYCU.js";
import {
x
} from "./chunk.CXZZ2LVK.js";
import {
__decorateClass
} from "./chunk.KIILAQWQ.js";
// src/components/badge/badge.component.ts
var SlBadge = class extends ShoelaceElement {
constructor() {
super(...arguments);
this.variant = "primary";
this.pill = false;
this.pulse = false;
}
render() {
return x`
<span
part="base"
class=${e({
badge: true,
"badge--primary": this.variant === "primary",
"badge--success": this.variant === "success",
"badge--neutral": this.variant === "neutral",
"badge--warning": this.variant === "warning",
"badge--danger": this.variant === "danger",
"badge--pill": this.pill,
"badge--pulse": this.pulse
})}
role="status"
>
<slot></slot>
</span>
`;
}
};
SlBadge.styles = badge_styles_default;
__decorateClass([
n({ reflect: true })
], SlBadge.prototype, "variant", 2);
__decorateClass([
n({ type: Boolean, reflect: true })
], SlBadge.prototype, "pill", 2);
__decorateClass([
n({ type: Boolean, reflect: true })
], SlBadge.prototype, "pulse", 2);
export {
SlBadge
};