Snai3i-MarketPlace / frontend / src / pages / Dashboard / Home / components / Card.tsx
Card.tsx
Raw
import React from 'react';
import { LucideIcon } from 'lucide-react';

interface DashCardProps {
  icon: LucideIcon;
  title: string;
  value: number | string;
}

const DashCard: React.FC<DashCardProps> = ({ icon: Icon, title, value }) => {
  return (
    <div className="flex flex-col w-full max-w-[350px] border rounded-lg items-start gap-6 p-6 bg-white">
      <div className="flex flex-row justify-between w-full">
        <div className="text-md font-medium">{title}</div>
        <Icon />
      </div>
      <div className="card-body">
        <h2 className="text-2xl font-bold">{value}</h2>
      </div>
    </div>
  );
};

export default DashCard;