import clsx from 'clsx'; const Price = ({ amount, className, as, currencyCode = 'USD', currencyCodeClassName, showCurrency = false }: { amount: string; as?: 'p' | 'span'; className?: string; currencyCode: string; currencyCodeClassName?: string; showCurrency?: boolean; } & React.ComponentProps<'p'>) => { // Convert string to float and check if it is zero const price = parseFloat(amount); // Return 'Included' if price is 0 if (price === 0) { return
Included
; } const Component = as || 'p'; // Otherwise, format and display the price return (