Initial state for GitNexus analysis

This commit is contained in:
Zaid Marzguioui
2026-03-29 19:44:57 +02:00
parent 9d7c7f8030
commit 61ff48cb73
155 changed files with 23483 additions and 1722 deletions

View File

@@ -0,0 +1,44 @@
import { Card, CardContent } from '@kit/ui/card';
interface StatsCardProps {
title: string;
value: string | number;
icon?: React.ReactNode;
description?: string;
trend?: { value: number; label: string };
}
/**
* Reusable stat card with icon + value + label + optional trend.
* Used on dashboard and list pages.
*/
export function StatsCard({ title, value, icon, description, trend }: StatsCardProps) {
return (
<Card>
<CardContent className="p-6">
<div className="flex items-center justify-between">
<div className="space-y-1">
<p className="text-sm font-medium text-muted-foreground">{title}</p>
<p className="text-2xl font-bold">{value}</p>
{description && (
<p className="text-xs text-muted-foreground">{description}</p>
)}
</div>
{icon && (
<div className="rounded-full bg-primary/10 p-3 text-primary">
{icon}
</div>
)}
</div>
{trend && (
<div className="mt-2 flex items-center text-xs">
<span className={trend.value >= 0 ? 'text-green-600' : 'text-red-600'}>
{trend.value >= 0 ? '↑' : '↓'} {Math.abs(trend.value)}%
</span>
<span className="ml-1 text-muted-foreground">{trend.label}</span>
</div>
)}
</CardContent>
</Card>
);
}