UNPKG

headless-currency-input

Version:

Headless Currency Input is a component to format currency input in an elegant way.

17 lines (14 loc) 883 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ForwardedRef } from 'react'; import { InputAttributes, NumberFormatBaseProps } from 'react-number-format'; type CurrencyInputProps<BaseType = InputAttributes> = Omit<NumberFormatBaseProps<BaseType>, "format" | "prefix" | "customInput"> & { locale?: string; currency?: string; withCurrencySymbol?: boolean; customInput?: React.ComponentType<BaseType>; }; declare function RenderCurrencyInput<BaseType = InputAttributes>({ locale, currency, withCurrencySymbol, ...props }: CurrencyInputProps<BaseType>, forwadedRef: ForwardedRef<HTMLInputElement>): react_jsx_runtime.JSX.Element; declare const CurrencyInput: <BaseType = InputAttributes>(props: CurrencyInputProps<BaseType> & { ref?: ForwardedRef<HTMLInputElement>; }) => ReturnType<typeof RenderCurrencyInput<BaseType>>; export { CurrencyInput };