Refactored a bunch of shit
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m57s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m57s
This commit is contained in:
25
src/components/StatCard.astro
Normal file
25
src/components/StatCard.astro
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
import { Icon } from 'astro-icon/components';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
value: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
color?: string;
|
||||
valueClass?: string;
|
||||
}
|
||||
|
||||
const { title, value, description, icon, color = 'text-primary', valueClass } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="stat">
|
||||
{icon && (
|
||||
<div class:list={["stat-figure", color]}>
|
||||
<Icon name={icon} class="w-8 h-8" />
|
||||
</div>
|
||||
)}
|
||||
<div class="stat-title">{title}</div>
|
||||
<div class:list={["stat-value", color, valueClass]}>{value}</div>
|
||||
{description && <div class="stat-desc">{description}</div>}
|
||||
</div>
|
||||
Reference in New Issue
Block a user