Refactor TransactionCard component
Refactor TransactionCard component into smaller, more manageable components without changing functionality.
This commit is contained in:
26
src/components/transaction/TransactionAmount.tsx
Normal file
26
src/components/transaction/TransactionAmount.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
import React from 'react';
|
||||
import { ArrowDownIcon } from 'lucide-react';
|
||||
|
||||
interface TransactionAmountProps {
|
||||
amount: number;
|
||||
}
|
||||
|
||||
const TransactionAmount: React.FC<TransactionAmountProps> = ({ amount }) => {
|
||||
const formattedAmount = new Intl.NumberFormat('ko-KR', {
|
||||
style: 'currency',
|
||||
currency: 'KRW',
|
||||
maximumFractionDigits: 0
|
||||
}).format(amount);
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-1">
|
||||
<ArrowDownIcon size={12} className="text-neuro-income" />
|
||||
<span className="font-medium text-neuro-income">
|
||||
{formattedAmount}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionAmount;
|
||||
Reference in New Issue
Block a user