import { cn } from 'ui'
import { formatCurrency } from '@/lib/helpers'
export interface BreakdownRowProps {
label: string
description?: string
children: React.ReactNode
}
export const BreakdownRow = ({ label, description, children }: BreakdownRowProps) => (
{label}
{description && {description}}
{children}
)
export const ValueChange = ({ from, to }: { from: string; to: string }) => (
{from}
→
{to}
)
export const PriceDelta = ({ delta }: { delta: number }) => (
= 0 ? 'text-brand' : 'text-destructive')}>
{delta >= 0 ? `+${formatCurrency(delta)}` : `-${formatCurrency(Math.abs(delta))}`}{' '}
per month
)