Add icons to category cards
This commit adds icons to the expense category cards.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
import { Coffee, Home, Car } from 'lucide-react';
|
||||||
|
|
||||||
interface BudgetCardProps {
|
interface BudgetCardProps {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -9,6 +10,13 @@ interface BudgetCardProps {
|
|||||||
color?: string;
|
color?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Category icons mapping
|
||||||
|
const categoryIcons: Record<string, React.ReactNode> = {
|
||||||
|
식비: <Coffee size={18} />,
|
||||||
|
생활비: <Home size={18} />,
|
||||||
|
교통비: <Car size={18} />,
|
||||||
|
};
|
||||||
|
|
||||||
const BudgetCard: React.FC<BudgetCardProps> = ({
|
const BudgetCard: React.FC<BudgetCardProps> = ({
|
||||||
title,
|
title,
|
||||||
current,
|
current,
|
||||||
@@ -34,7 +42,12 @@ const BudgetCard: React.FC<BudgetCardProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="neuro-card">
|
<div className="neuro-card">
|
||||||
<h3 className="text-sm font-medium text-gray-600 mb-1">{title}</h3>
|
<div className="flex items-center gap-2 mb-1">
|
||||||
|
<div className="text-neuro-income">
|
||||||
|
{categoryIcons[title]}
|
||||||
|
</div>
|
||||||
|
<h3 className="text-sm font-medium text-gray-600">{title}</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-2">
|
||||||
<p className="text-lg font-semibold">{formattedCurrent}</p>
|
<p className="text-lg font-semibold">{formattedCurrent}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user