28 lines
714 B
TypeScript
28 lines
714 B
TypeScript
|
|
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(Math.abs(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;
|