Refactor
This commit is contained in:
21
components/dashboard/order-stats.tsx
Normal file
21
components/dashboard/order-stats.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
|
||||
interface OrderStatsProps {
|
||||
title: string;
|
||||
value: string;
|
||||
icon: LucideIcon;
|
||||
}
|
||||
|
||||
export default function OrderStats({ title, value, icon: Icon }: OrderStatsProps) {
|
||||
return (
|
||||
<div className="w-full bg-white dark:bg-zinc-900/70 border border-zinc-100 dark:border-zinc-800 rounded-xl shadow-sm backdrop-blur-xl">
|
||||
<div className="p-4">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<h2 className="text-xs font-medium text-zinc-600 dark:text-zinc-400">{title}</h2>
|
||||
<Icon className="w-4 h-4 text-zinc-600 dark:text-zinc-400" />
|
||||
</div>
|
||||
<p className="text-2xl font-semibold text-zinc-900 dark:text-zinc-50">{value}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user