"use client"; import { ArrowDown, ArrowUp, MoreVertical } from "lucide-react"; import clsx from "clsx"; interface StockCardProps { symbol: string; name: string; price: number; change: number; changePercentage: number; chartData?: number[]; } export function StockCard({ symbol, name, price, change, changePercentage, chartData = [25, 30, 28, 35, 32, 40, 38], }: StockCardProps) { const isPositive = change >= 0; const max = Math.max(...chartData); const min = Math.min(...chartData); const range = max - min; return (

{symbol}

{name}
${price.toFixed(2)}
{isPositive ? ( ) : ( )} ${Math.abs(change).toFixed(2)} ({Math.abs(changePercentage).toFixed(2)}%)
`L ${i + 1} ${point - min}`) .join(" ")}`} fill="none" stroke={isPositive ? "#00C853" : "#FF3D00"} strokeWidth="1.5" vectorEffect="non-scaling-stroke" />
); }