21 lines
414 B
Text
21 lines
414 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>
|