Spaces:
Build error
Build error
Upload components/StatCard.jsx with huggingface_hub
Browse files- components/StatCard.jsx +6 -5
components/StatCard.jsx
CHANGED
|
@@ -3,8 +3,9 @@ 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-
|
| 7 |
-
<div className="
|
|
|
|
| 8 |
<div>
|
| 9 |
<p className="text-sm font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
| 10 |
{title}
|
|
@@ -14,12 +15,12 @@ export default function StatCard({ title, value, change, positive, icon }) {
|
|
| 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>
|
|
@@ -29,7 +30,7 @@ export default function StatCard({ title, value, change, positive, icon }) {
|
|
| 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>
|
|
|
|
| 3 |
|
| 4 |
export default function StatCard({ title, value, change, positive, icon }) {
|
| 5 |
return (
|
| 6 |
+
<div className="card p-6 transition-all duration-300 hover:shadow-lg hover:-translate-y-1 relative overflow-hidden group">
|
| 7 |
+
<div className="absolute top-0 right-0 -mt-4 -mr-4 w-24 h-24 bg-gradient-to-br from-primary-500/10 to-transparent rounded-full group-hover:scale-150 transition-transform duration-500"></div>
|
| 8 |
+
<div className="flex items-center justify-between relative z-10">
|
| 9 |
<div>
|
| 10 |
<p className="text-sm font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
| 11 |
{title}
|
|
|
|
| 15 |
</p>
|
| 16 |
<div className="mt-2 flex items-center text-sm">
|
| 17 |
{positive ? (
|
| 18 |
+
<span className="flex items-center text-green-600 font-medium bg-green-50 px-2 py-0.5 rounded dark:bg-green-900/30 dark:text-green-400">
|
| 19 |
<TrendingUp className="w-4 h-4 mr-1" />
|
| 20 |
{change}
|
| 21 |
</span>
|
| 22 |
) : (
|
| 23 |
+
<span className="flex items-center text-red-600 font-medium bg-red-50 px-2 py-0.5 rounded dark:bg-red-900/30 dark:text-red-400">
|
| 24 |
<TrendingDown className="w-4 h-4 mr-1" />
|
| 25 |
{change}
|
| 26 |
</span>
|
|
|
|
| 30 |
</span>
|
| 31 |
</div>
|
| 32 |
</div>
|
| 33 |
+
<div className="p-3 bg-gray-50 rounded-full dark:bg-gray-700/50 group-hover:bg-primary-50 dark:group-hover:bg-primary-900/20 transition-colors duration-300">
|
| 34 |
{icon}
|
| 35 |
</div>
|
| 36 |
</div>
|