import { Ticker, TickerIcon, TickerPrice, TickerPriceChange, TickerSymbol, } from "./ticker"; import { Avatar, AvatarFallback } from "./__components-ui-avatar"; const stocks = [ { symbol: "AAPL", price: 187.42, change: 2.34 }, { symbol: "MSFT", price: 421.17, change: -1.22 }, { symbol: "GOOGL", price: 171.58, change: 0.88 }, ]; export default function TickerDemo() { return ( <div className="flex flex-col gap-3 items-center justify-center p-8 w-full"> {stocks.map((stock) => ( <Ticker key={stock.symbol} className="flex items-center gap-3 w-full max-w-xs border rounded-lg p-3"> <TickerIcon> <Avatar className="size-8"> <AvatarFallback className="text-xs font-bold bg-violet-100 text-violet-700"> {stock.symbol.slice(0, 2)} </AvatarFallback> </Avatar> </TickerIcon> <TickerSymbol symbol={stock.symbol} /> <div className="ml-auto flex items-center gap-2"> <TickerPrice price={stock.price} /> <TickerPriceChange change={stock.change} /> </div> </Ticker> ))} </div> ); }