import React from 'react'

interface CardSummaryProps {
  color: string
  title: string
  value: number | string
  icon: React.ReactNode
}

const CardSummary: React.FC<CardSummaryProps> = (props) => {
  return (
    <div className="bg-white border p-6 px-8 rounded border-slate-200">
      <div className="flex items-center gap-2">
        <div
          className={`bg-${props.color}-100 w-10 h-10 rounded-full flex items-center justify-center`}
        >
          {props.icon}
        </div>
        <p className="font-medium">{props.title}</p>
      </div>

      <div className="mt-5">
        <h5 className="text-3xl font-bold tracking-tight text-gray-900 dark:text-white">
          {props.value}
        </h5>
        <p className="font-normal text-subtitle text-sm">
          From the selected month
        </p>
      </div>
    </div>
  )
}

export default CardSummary
