react-native-amount-textfield
Version:
This library gives you a Amount TextField component, which has formatted value based on International Currency standard. The component return back float value ( the actual Number) and a Formatted value which can be saved in a state and used for display i
15 lines (14 loc) • 559 B
TypeScript
import React from 'react';
import { TextInputProps } from 'react-native';
export interface AmountTypes {
formattedValue: string;
floatValue: number;
error: boolean;
}
export declare type AmountTextFieldProps = Pick<TextInputProps, 'style' | 'placeholderTextColor' | 'editable'> & {
precision?: number;
value: string | null;
onChangeValue?: (value: AmountTypes) => void;
};
export declare const getFormattedFloatNumber: (value: number, precision: number) => string;
export declare const AmountTextField: React.FC<AmountTextFieldProps>;