added components Badge, TypeTitle, migrated existing code accordingly
This commit is contained in:
parent
83dcae4441
commit
59035e2190
20 changed files with 2493 additions and 1357 deletions
21
src/components/Badge.astro
Normal file
21
src/components/Badge.astro
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue