viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
171 stars 66 forks source link

Feature Request: Allow different phone number libraries to be used instead of libphonenumber-js #93

Closed djangbahevans closed 1 year ago

djangbahevans commented 1 year ago

For an already existing project that might already be using a different phone number library (for different purposes), it might be discouraging to use this component as it adds another dependency (libphonenumber-js). It would be nice to be able to use a different library instead. This could allow a user to customize the component in different ways, including how numbers are formatted. One way this could be implemented is by specifying an adapter which meets a certain interface as is done with MUI's date and time components.

viclafouch commented 1 year ago

Hello @djangbahevans

Thanks for your request, but it seems that it requires a lot of changes, feel free to open a PR ! libphonenumber-js is the heart of the mui-tel-input, so you will have to manage a lot of logic for each adapter..

Ty