added components Badge, TypeTitle, migrated existing code accordingly

This commit is contained in:
Xanazf 2024-10-18 20:56:04 +03:00
parent 83dcae4441
commit 59035e2190
No known key found for this signature in database
GPG key ID: 4E4A5AD1FB748427
20 changed files with 2493 additions and 1357 deletions

View file

@ -0,0 +1,21 @@
---
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>