import React from 'react'; import { ArrowDownIcon, ArrowUp } from 'lucide-react'; import { formatPriceWithToman } from '@/lib/utils/priceUtils'; interface TransactionItemProps { amount: number; description: string; type: 'deposit' | 'withdraw'; isLast?: boolean; } const TransactionItem = ({ amount, description, type, isLast = false, }: TransactionItemProps) => { const isDeposit = type === 'deposit'; const Icon = isDeposit ? ArrowDownIcon : ArrowUp; const amountColor = isDeposit ? 'text-success' : 'text-error'; const bgColor = isDeposit ? 'bg-success/10' : 'bg-error/10'; const iconColor = isDeposit ? 'text-success' : 'text-error'; return (
{description}
{isDeposit ? '+' : '-'} {formatPriceWithToman(amount)} ۱۴۰۳/۰۸/۲۴
); }; export default TransactionItem;