UNPKG

@capgeminiuk/dcx-react-library

Version:

[![CircleCI](https://circleci.com/gh/Capgemini/dcx-react-library.svg?style=svg)](https://circleci.com/gh/Capgemini/dcx-react-library)

40 lines (39 loc) 960 B
import React from 'react'; import IMask from 'imask'; export type MaskedEvent = { value: string; unmaskedValue: string; }; type FormInputMaskedProps = { /** * define all the option you want to pass to mask your input * please refer to https://imask.js.org/ to look for the available options */ options: IMask.AnyMaskedOptions; /** * function that will trigger all the time there's a change in the input **/ onChange?: (event: MaskedEvent) => void; /** * input value **/ value: string; /** * input name **/ name?: string; /** * input type **/ type?: string; /** * you can define your own properties */ props?: any; /** * input aria-label **/ ariaLabel?: string; }; export declare const FormInputMasked: ({ options, onChange, value, name, type, ariaLabel, ...props }: FormInputMaskedProps) => React.JSX.Element; export {};