import React from 'react'; import { cn } from '@/lib/utils'; interface BudgetCardProps { title: string; current: number; total: number; color?: string; } const BudgetCard: React.FC = ({ title, current, total, color = 'neuro-income' }) => { const percentage = Math.min(Math.round((current / total) * 100), 100); const formattedCurrent = new Intl.NumberFormat('ko-KR', { style: 'currency', currency: 'KRW', maximumFractionDigits: 0 }).format(current); const formattedTotal = new Intl.NumberFormat('ko-KR', { style: 'currency', currency: 'KRW', maximumFractionDigits: 0 }).format(total); // Determine progress bar color based on percentage const progressBarColor = percentage >= 90 ? 'bg-yellow-400' : `bg-${color}`; return (

{title}

{formattedCurrent}

/ {formattedTotal}

= 90 ? "text-neuro-expense" : "text-gray-500" )}> {percentage}%
); }; export default BudgetCard;