00Boobs00 commited on
Commit
f07e273
·
verified ·
1 Parent(s): ff2b7ce

Upload components/StatCard.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/StatCard.jsx +38 -0
components/StatCard.jsx ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { TrendingUp, TrendingDown } from 'lucide-react';
3
+
4
+ export default function StatCard({ title, value, change, positive, icon }) {
5
+ return (
6
+ <div className="card p-6 transition-transform hover:-translate-y-1 duration-300">
7
+ <div className="flex items-center justify-between">
8
+ <div>
9
+ <p className="text-sm font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
10
+ {title}
11
+ </p>
12
+ <p className="mt-2 text-3xl font-bold text-gray-900 dark:text-white">
13
+ {value}
14
+ </p>
15
+ <div className="mt-2 flex items-center text-sm">
16
+ {positive ? (
17
+ <span className="flex items-center text-green-600 font-medium">
18
+ <TrendingUp className="w-4 h-4 mr-1" />
19
+ {change}
20
+ </span>
21
+ ) : (
22
+ <span className="flex items-center text-red-600 font-medium">
23
+ <TrendingDown className="w-4 h-4 mr-1" />
24
+ {change}
25
+ </span>
26
+ )}
27
+ <span className="ml-2 text-gray-500 dark:text-gray-400">
28
+ vs last month
29
+ </span>
30
+ </div>
31
+ </div>
32
+ <div className="p-3 bg-gray-50 rounded-full dark:bg-gray-700/50">
33
+ {icon}
34
+ </div>
35
+ </div>
36
+ </div>
37
+ );
38
+ }