/
ivaninvv
/
dashboard
Обзор
Документация
Войти
/
ivaninvv
/
dashboard
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
claude-react
react/components/StatsCards.tsx
54 строки
1 KB
VladimirIvanin
react
30 ноя 2025, 03:20
30 ноя 2025, 03:20
030fe15
Код
Авторство
О чём код?
'use client' import { Package, DollarSign, TrendingUp, Users } from 'lucide-react' import StatsCard from './StatsCard' const StatsCards = () => { const stats = [ { title: 'Products Sold', subtitle: 'Number of items sold', value: '16', icon: <Package className="w-6 h-6 text-purple-600" />, iconBgColor: 'bg-purple-50', }, { title: 'Total Sales', subtitle: 'Cumulative sales revenue', value: '$5000', icon: <DollarSign className="w-6 h-6 text-red-500" />, iconBgColor: 'bg-red-50', }, { title: 'Monthly Sales', subtitle: 'Sales generated', value: '$670', icon: <TrendingUp className="w-6 h-6 text-yellow-500" />, iconBgColor: 'bg-yellow-50', }, { title: 'Total Customers', subtitle: 'Customers acquired', value: '5', icon: <Users className="w-6 h-6 text-cyan-500" />, iconBgColor: 'bg-cyan-50', }, ] return ( <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"> {stats.map((stat) => ( <StatsCard key={stat.title} title={stat.title} subtitle={stat.subtitle} value={stat.value} icon={stat.icon} iconBgColor={stat.iconBgColor} /> ))} </div> ) } export default StatsCards