refactor: Update MetricCard component in Dashboard for improved layout and styling, enhancing visual hierarchy and responsiveness
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 5m16s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 5m16s
This commit is contained in:
+11
-12
@@ -37,20 +37,19 @@ function StatCard({ icon: Icon, color, value, title, subtitle, to }) {
|
||||
|
||||
function MetricCard({ title, value, icon: Icon, color, description }) {
|
||||
return (
|
||||
<div className="card">
|
||||
<div className="card-body">
|
||||
<div className="d-flex align-items-center">
|
||||
<span className={`avatar avatar-sm me-3 bg-${color}-lt text-${color}`}>
|
||||
<Icon size={20} />
|
||||
</span>
|
||||
<div>
|
||||
<div className="h4 mb-1">{value}</div>
|
||||
<div className="text-muted small">{title}</div>
|
||||
<div className="card h-100 position-relative">
|
||||
<div className="card-body d-flex align-items-center">
|
||||
<span className={`avatar avatar-lg me-3 bg-${color}-lt text-${color} border-0`}>
|
||||
<Icon size={32} />
|
||||
</span>
|
||||
<div className="flex-grow-1">
|
||||
<div className="h3 mb-0 fw-bold">
|
||||
{value} <span className="fs-5 fw-normal">{title}</span>
|
||||
</div>
|
||||
{description && (
|
||||
<div className="text-muted lh-1">{description}</div>
|
||||
)}
|
||||
</div>
|
||||
{description && (
|
||||
<div className="mt-2 text-muted small">{description}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user