el.xwx.moe/components/DashboardItem.tsx

24 lines
783 B
TypeScript
Raw Normal View History

2023-12-16 09:11:35 -06:00
export default function dashboardItem({
name,
value,
icon,
}: {
2023-11-09 10:44:49 -06:00
name: string;
value: number;
2023-12-16 09:11:35 -06:00
icon: string;
}) {
2023-11-09 10:44:49 -06:00
return (
2024-11-07 01:09:56 -06:00
<div className="flex items-center justify-between w-full rounded-2xl border border-neutral-content p-3 bg-gradient-to-tr from-neutral-content/70 to-50% to-base-200">
<div className="w-14 aspect-square flex justify-center items-center bg-primary/20 rounded-xl select-none">
<i className={`${icon} text-primary text-3xl drop-shadow`}></i>
2023-11-09 10:44:49 -06:00
</div>
2023-12-16 09:11:35 -06:00
<div className="ml-4 flex flex-col justify-center">
2024-11-07 01:09:56 -06:00
<p className="text-neutral text-xs tracking-wider text-right">{name}</p>
<p className="font-thin text-4xl text-primary mt-0.5 text-right">
{value || 0}
</p>
2023-11-09 10:44:49 -06:00
</div>
</div>
);
}