Modify add transaction button
The add transaction button was modified to always display "+ 지출 입력" on the right bottom side.
This commit is contained in:
@@ -16,7 +16,6 @@ import { manageTitleSuggestions } from '@/utils/userTitlePreferences'; // 새로
|
|||||||
const AddTransactionButton = () => {
|
const AddTransactionButton = () => {
|
||||||
const [showExpenseDialog, setShowExpenseDialog] = useState(false);
|
const [showExpenseDialog, setShowExpenseDialog] = useState(false);
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
const [isHovered, setIsHovered] = useState(false);
|
|
||||||
const { addTransaction } = useBudget();
|
const { addTransaction } = useBudget();
|
||||||
const { addNotification } = useNotifications();
|
const { addNotification } = useNotifications();
|
||||||
|
|
||||||
@@ -145,18 +144,14 @@ const AddTransactionButton = () => {
|
|||||||
<>
|
<>
|
||||||
<div className="fixed bottom-24 right-6 z-20">
|
<div className="fixed bottom-24 right-6 z-20">
|
||||||
<button
|
<button
|
||||||
className={`transition-all duration-300 bg-neuro-income shadow-neuro-flat hover:shadow-neuro-convex text-white ${
|
className="transition-all duration-300 bg-neuro-income shadow-neuro-flat hover:shadow-neuro-convex text-white px-4 py-3 rounded-full"
|
||||||
isHovered ? 'px-4 py-3 rounded-full' : 'p-4 rounded-full'
|
|
||||||
}`}
|
|
||||||
onClick={() => setShowExpenseDialog(true)}
|
onClick={() => setShowExpenseDialog(true)}
|
||||||
onMouseEnter={() => setIsHovered(true)}
|
|
||||||
onMouseLeave={() => setIsHovered(false)}
|
|
||||||
aria-label="지출 추가"
|
aria-label="지출 추가"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<PlusIcon size={isHovered ? 20 : 24} />
|
<PlusIcon size={20} />
|
||||||
{isHovered && <span className="animate-fade-in">지출 입력</span>}
|
<span>지출 입력</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user