I downloaded the package npm i react-text-mask --save I made the import in my Contact file but by default it goes out like this (55) 5555-5555 I'm having trouble putting this pattern 5555-5555
Could anyone give me a hint how to do this?
My code looks like this:
<div class="row">
<div class="input-field col s12">
<MaskedInput
mask={['(', /[1-9]/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]}
className="form-control"
placeholder="Enter a phone number"
guide={false}
id="my-input-id"
onBlur={() => {}}
onChange={() => {}}
/>
</div>