Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/components/stats/stat-card.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/components/stats/stat-card.tsx |
| Original SHA-256 | e9865e1c23e9c35ed7699214d07c5f6e0a23d87578f87c6660447b065bcd0526 |
| Git blob SHA | 9978a457c2274899a160d610f26c39c714727712 |
| Reading-copy SHA-256 | e9865e1c23e9c35ed7699214d07c5f6e0a23d87578f87c6660447b065bcd0526 |
Recovered source transcript
Download complete source text ↓33 lines · 1.0 KB
import { Tooltip, TooltipContent, TooltipTrigger } from '@thedaviddias/design-system/tooltip'
import type { LucideIcon } from 'lucide-react'
import { Card } from '@/components/ui/card'
interface StatCardProps {
title: string
value: string | number
icon: LucideIcon
description?: string
}
/**
* Renders a statistics card with icon, title, value, and optional tooltip
*/
export function StatCard({ title, value, icon: Icon, description }: StatCardProps) {
return (
<Tooltip>
<TooltipTrigger asChild>
<Card className="p-6 text-center transition-all duration-200 hover:border-primary hover:scale-105 hover:shadow-lg cursor-help">
<Icon className="h-8 w-8 mx-auto mb-2 text-primary" />
<h3 className="text-lg font-semibold">{title}</h3>
<p className="text-3xl font-bold">{value}</p>
</Card>
</TooltipTrigger>
{description && (
<TooltipContent>
<p>{description}</p>
</TooltipContent>
)}
</Tooltip>
)
}