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
158 stars 65 forks source link

Feature request: Expose css selector to select flag #116

Closed spicattutti closed 6 months ago

spicattutti commented 8 months ago

v5 made the flag images slightly bigger (26x26px instead of 20*20px).

We'd like to keep the UI somewhat consistent. Fix would be to style the flag using the existing selector that is used internally (MuiTelInput-Flag)

image

Could the class name be exported as string constant, to have a fixed reference to the box so that consumers can safely style the flag, without the risk of the reference breaking in between version updates?

Just targeting any img within the component seems a little dangerous on the long run.

MUI helps in those cases by exporting class names, therefore my suggestion.

import { outlinedInputClasses } from "@mui/material/OutlinedInput";
viclafouch commented 6 months ago

Hello !

Not sure about the solution, please feel free to open a PR ;)