import clsx from "clsx"; import type { CryptocurrencyDetailsResponse } from "~/types/crypto-api"; import { formatPercentage } from "~/utils/format"; export function DescriptionSection({ currency }: { currency: CryptocurrencyDetailsResponse["currency"]; }) { return (

{currency.name} ({currency.symbol})

{currency.description}

Price ${currency.price.toLocaleString()}
0 ? "bg-emerald-100 text-emerald-700" : "bg-rose-100 text-rose-700" )} > {formatPercentage(currency.percent_change_24h)}
); }