react-number-format
Version:
React component to format number in an input or as a text.
8 lines (7 loc) • 806 B
TypeScript
import React from 'react';
import { NumericFormatProps, ChangeMeta, InputAttributes, NumberFormatBaseProps } from './types';
export declare function format<BaseType = InputAttributes>(numStr: string, props: NumericFormatProps<BaseType>): string;
export declare function removeFormatting<BaseType = InputAttributes>(value: string, changeMeta: ChangeMeta, props: NumericFormatProps<BaseType>): string;
export declare function getCaretBoundary<BaseType = InputAttributes>(formattedValue: string, props: NumericFormatProps<BaseType>): boolean[];
export declare function useNumericFormat<BaseType = InputAttributes>(props: NumericFormatProps<BaseType>): NumberFormatBaseProps<BaseType>;
export default function NumericFormat<BaseType = InputAttributes>(props: NumericFormatProps<BaseType>): React.ReactElement;