import clsx from "clsx"; import { Area, AreaChart, XAxis, YAxis } from "recharts"; import type { CryptocurrencyDetailsResponse } from "~/types/crypto-api"; import { formatPercentage } from "~/utils/format"; export function PriceChart({ currency, expanded, onToggleExpand }: { currency: CryptocurrencyDetailsResponse["currency"]; expanded: boolean; onToggleExpand: () => void; }) { return (

Price Chart

Historical price movement of the cryptocurrency.

Price

${currency.price.toLocaleString()}

Change 24h

0 ? "text-emerald-700" : "text-rose-700")}>{formatPercentage(currency.percent_change_24h)}

''} /> val.toLocaleString()} width={120} />
); }