react-native-mask-text
Version:
A React Native and Expo library to mask text
17 lines (16 loc) • 784 B
TypeScript
import React, { ForwardRefRenderFunction } from 'react';
import { TextInput, TextInputProps } from 'react-native';
import type { MaskOptions } from '../@types/MaskOptions';
import type { FormatType } from '../@types/FormatType';
declare type TIProps = Omit<TextInputProps, 'onChangeText'>;
export interface MaskedTextInputProps extends TIProps {
mask?: string;
type?: FormatType;
options?: MaskOptions;
defaultValue?: string;
onChangeText: (text: string, rawText: string) => void;
inputAccessoryView?: JSX.Element;
}
export declare const MaskedTextInputComponent: ForwardRefRenderFunction<TextInput, MaskedTextInputProps>;
export declare const MaskedTextInput: React.ForwardRefExoticComponent<MaskedTextInputProps & React.RefAttributes<TextInput>>;
export {};