/
ivaninvv
/
dashboard
Обзор
Документация
Войти
/
ivaninvv
/
dashboard
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
claude-react
react/components/StatsCard.tsx
30 строк
840 B
VladimirIvanin
react
30 ноя 2025, 03:20
30 ноя 2025, 03:20
030fe15
Код
Авторство
О чём код?
'use client' type StatsCardProps = { title: string subtitle: string value: string | number icon: React.ReactNode iconBgColor: string } const StatsCard = ({ title, subtitle, value, icon, iconBgColor }: StatsCardProps) => { return ( <div className="bg-white rounded-lg border border-gray-200 p-6"> <div className="flex items-start justify-between"> <div className="flex-1"> <p className="text-sm font-semibold text-gray-900 mb-1">{title}</p> <p className="text-xs text-gray-500 mb-4">{subtitle}</p> <p className="text-2xl font-bold text-gray-900">{value}</p> </div> <div className={`w-12 h-12 rounded-lg flex items-center justify-center ${iconBgColor}`} > {icon} </div> </div> </div> ) } export default StatsCard