quickshell-web/src/components/Badge.astro
2026-04-02 23:13:53 -07:00

21 lines
412 B
Text

---
import { Icon } from "astro-icon/components";
export interface Props {
badgeText: string;
withIcon?: boolean;
badgeIconName?: string;
}
const { badgeText, withIcon = true, badgeIconName } = Astro.props;
---
<span class="badge">
{withIcon &&
(
badgeIconName ?
<Icon name={badgeIconName}/>
: <Icon name={"flag"}/>
)}
<span class="badge-text">{badgeText}</span>
</span>