20 lines
671 B
TypeScript
20 lines
671 B
TypeScript
import React from 'react';
|
|
import BudgetCard from '@/components/BudgetCard';
|
|
interface BudgetCategoriesSectionProps {
|
|
categories: {
|
|
title: string;
|
|
current: number;
|
|
total: number;
|
|
}[];
|
|
}
|
|
const BudgetCategoriesSection: React.FC<BudgetCategoriesSectionProps> = ({
|
|
categories
|
|
}) => {
|
|
return <>
|
|
<h2 className="text-lg font-semibold mb-3 mt-8">지출 그래프</h2>
|
|
<div className="grid gap-4 mb-8 desktop-card">
|
|
{categories.map((category, index) => <BudgetCard key={index} title={category.title} current={category.current} total={category.total} color="neuro-income" />)}
|
|
</div>
|
|
</>;
|
|
};
|
|
export default BudgetCategoriesSection; |