import type { ReactNode } from "react"; import MoneyValues from "@/components/shared/money-values"; import { Progress } from "@/components/ui/progress"; import { formatPaymentBreakdownPercentage, formatPaymentBreakdownTransactionsLabel, } from "@/lib/dashboard/payment-breakdown-formatters"; const ICON_WRAPPER_CLASS = "flex size-9.5 shrink-0 items-center justify-center rounded-full bg-muted text-foreground"; export type PaymentBreakdownListItemData = { id: string; title: string; icon: ReactNode; amount: number; transactions: number; percentage: number; }; type PaymentBreakdownListItemProps = { item: PaymentBreakdownListItemData; }; export function PaymentBreakdownListItem({ item, }: PaymentBreakdownListItemProps) { return (
  • {item.icon}

    {item.title}

    {formatPaymentBreakdownTransactionsLabel(item.transactions)} {formatPaymentBreakdownPercentage(item.percentage)}
  • ); }