react-password-mask icon indicating copy to clipboard operation
react-password-mask copied to clipboard

Initial Hide/Show button props

Open felipesilvati opened this issue 7 years ago • 3 comments

It would be very helpful if I could define through a boolean props the initial state of the show/hide button. (hidden by default)

Thanks!

felipesilvati avatar Feb 02 '18 21:02 felipesilvati

It's only a matter of setting the "passwordShown" initial state from a prop instead of hardcoding to false:

https://github.com/zakangelle/react-password-mask/blob/8b338ac5aecdb457993cd0c1f842195fd0185e00/src/index.js#L49-L52

felipesilvati avatar Feb 02 '18 21:02 felipesilvati

I'd be willing to work on that if you think it's a good idea. Cheers!

felipesilvati avatar Feb 02 '18 21:02 felipesilvati

Maybe you can fork this repo and try to add those feature you have in mind, and create a PR for it.

channox32 avatar Feb 09 '18 08:02 channox32