import { TrendingDown, TrendingUp } from "lucide-react"; import { cn } from "@/lib/utils"; const PRICE_FORMATTER = new Intl.NumberFormat("ko-KR"); function formatPrice(value: number) { return `${PRICE_FORMATTER.format(value)}원`; } interface StockPriceBadgeProps { currentPrice: number; change: number; changeRate: number; } export function StockPriceBadge({ currentPrice, change, changeRate, }: StockPriceBadgeProps) { const isPositive = change >= 0; const ChangeIcon = isPositive ? TrendingUp : TrendingDown; const changeColor = isPositive ? "text-red-500" : "text-blue-500"; const changeSign = isPositive ? "+" : ""; return (