Enhance budget input display
- Display existing values in budget input fields. - Remove recessed boxes from category inputs. - Add icons to 식비, 생활비, and 교통비 categories.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { EXPENSE_CATEGORIES } from '@/constants/categoryIcons';
|
||||
import { EXPENSE_CATEGORIES, categoryIcons } from '@/constants/categoryIcons';
|
||||
import { useIsMobile } from '@/hooks/use-mobile';
|
||||
|
||||
interface CategoryBudgetInputsProps {
|
||||
@@ -37,13 +37,16 @@ const CategoryBudgetInputs: React.FC<CategoryBudgetInputsProps> = ({
|
||||
return (
|
||||
<div className="space-y-3 w-full">
|
||||
{EXPENSE_CATEGORIES.map(category => (
|
||||
<div key={category} className="flex items-center justify-between w-full p-2 neuro-pressed rounded-lg">
|
||||
<label className="text-sm font-medium text-gray-700">{category}</label>
|
||||
<div key={category} className="flex items-center justify-between w-full p-2 rounded-lg">
|
||||
<div className="flex items-center space-x-2">
|
||||
<span className="text-neuro-income">{categoryIcons[category]}</span>
|
||||
<label className="text-sm font-medium text-gray-700">{category}</label>
|
||||
</div>
|
||||
<Input
|
||||
value={formatWithCommas(categoryBudgets[category] || 0)}
|
||||
onChange={(e) => handleInput(e, category)}
|
||||
placeholder="예산 입력"
|
||||
className={`neuro-pressed transition-colors duration-300 ${isMobile ? 'w-[150px]' : 'max-w-[150px]'}`}
|
||||
className={`transition-colors duration-300 ${isMobile ? 'w-[150px]' : 'max-w-[150px]'}`}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user