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
943 stars 536 forks source link

Feature Request : Use em and rem units for responsive design #308

Open aromalanil opened 4 years ago

aromalanil commented 4 years ago

I think using responsive units will be great, as I faced difficulty in overriding the styles using responsive units, to make the component fit in my layout in small screens.

stsiarzhanau commented 3 years ago

It's possible to achieve responsivness by setting width for containerClass (.react-tel-input) in responsive units and overriding .form-control width from 300px (default) to 100% But there's another problem. Width of .country-list dropdown is not calculated based on current .form-control width. We can only override it to some fixed width. 2020-09-13_11-33-07 2020-09-13_11-32-48

It'd be great to calculate width of dropdown dynamically.

bl00mber commented 3 years ago

Have any suggestions? PRs or CSS code posted here would be appreciated. However, default width should remain the same.