UNPKG

infinity-ui-elements

Version:

A React TypeScript component library with Tailwind CSS design system

46 lines 1.26 kB
import * as React from "react"; export interface AmountProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> { /** * The numeric amount value to display */ value: number; /** * Currency code (e.g., "USD", "INR", "EUR", "GBP") */ currency?: string; /** * Locale for number formatting (default: "en-US") */ locale?: string; /** * Minimum number of decimal places (default: 2) */ minimumFractionDigits?: number; /** * Maximum number of decimal places (default: 2) */ maximumFractionDigits?: number; /** * Whether to show the currency code/symbol (default: true) */ showCurrency?: boolean; /** * Custom className for the component */ className?: string; } /** * Amount component that displays formatted currency amounts with decimal numbers in superscript. * * @example * ```tsx * <Amount value={1234.56} currency="USD" /> * // Renders: USD 1,234.<sup>56</sup> * * <Amount value={5000} currency="INR" /> * // Renders: INR 5,000.<sup>00</sup> * ``` */ declare const Amount: React.ForwardRefExoticComponent<AmountProps & React.RefAttributes<HTMLSpanElement>>; export { Amount }; //# sourceMappingURL=Amount.d.ts.map