Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Select] Feature Request: Override Dropdown Icon #10959

Closed
rob2d opened this issue Apr 8, 2018 · 3 comments
Closed

[Select] Feature Request: Override Dropdown Icon #10959

rob2d opened this issue Apr 8, 2018 · 3 comments
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@rob2d
Copy link

rob2d commented Apr 8, 2018

Hi. I am hoping it seems reasonable to override icons; specifically the ArrowDropDown found in the Select components.

Currently (v1.0.0-beta.41), it is receiving the SVG from ArrowDropDown found in internal/svg-icons/ArrowDropDown. When overriding CSS content, we cannot re-write the SVG path via CSS (that I know of -- if known method here, please enlighten me!)

What I am doing as a workaround is overriding MuiSelect.icon in the theme overrides and then creating a wrapper component. Obviously, it is a little bit hacky and would be nice to simply have a built in svgIcon class (or anything related) provided in the classes API.

As a practical matter, it's actually pretty common to use something like a chevron in material-ui Dropdowns (see https://materialdesignicons.com/icon/chevron-down for example in mind). But either way, I think the library would benefit greatly for being able to change such a prominent part of the look and feel.

(Notwithstanding, excellent job with MUI 1.0.0 so far! Absolutely pleasant experience)

@oliviertassinari oliviertassinari added new feature New feature or request component: select This is the name of the generic UI component, not the React module! labels Apr 8, 2018
@oliviertassinari
Copy link
Member

@rob2d Your use case sounds good. We can add a customization point for the icon. Let's solve #10476 first so we have a guideline for the API and the implementation we are going to use.

@rob2d
Copy link
Author

rob2d commented Apr 9, 2018

@oliviertassinari Okay great. Thanks for considering this idea. I avoid anything Typescript+NPM related like the plague personally, but I will try to be of use if I can find the time.

@rob2d
Copy link
Author

rob2d commented May 4, 2018

@oliviertassinari This is great; another reason why I always default to this library for several years now.

Thanks! 😄 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants