bl00mber / react-phone-input-2

:telephone_receiver: Highly customizable phone input component with auto formatting
https://bl00mber.github.io/react-phone-input-2.html
MIT License
949 stars 536 forks source link

Allow custom input component #113

Open Wgil opened 5 years ago

Wgil commented 5 years ago

Hello,

Thanks for taking the time for maintaining this package. I'm wondering if there's any chance to allow a custom input component perhaps using render props pattern or through a simple prop?

I'd like to achieve something like this fork https://github.com/cezarderevlean/react-phone-input-mui and keep your latest changes as well.

Thanks in advance!

bl00mber commented 4 years ago

The solution should not overcomplicate current plugin structure, have defaults (work without custom components) and be fast and lightweight. If you want, you can send a PR or suggest ways of implementation.

cyrfer commented 4 years ago

Here is another fork which attempts a similar effect. https://github.com/alexplumb/material-ui-phone-number

bl00mber commented 4 years ago

@cyrfer this is not a custom component, this is material-ui component only. You can also achieve similar styles if you import this import 'react-phone-input-2/lib/material.css