-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Export createSvgIcon
from @material-ui/icons
#20268
Comments
createSvgIcon
from iconscreateSvgIcon
from @material-ui/icons
This is an internal utility that serves our specific purpose. We need to be able to adjust this to our internal needs which makes it unsuitable for public release. It's tiny enough that you can build your own utility or just use |
I have seen @dmtrKovalenko face the same problem: https://github.com/mui-org/material-ui-pickers/blob/next/lib/src/_shared/icons/ArrowDropDownIcon.tsx#L2. So far, we have
|
This is not the same problem though. You're talking about internal usage which is quite different from public release. |
@eps1lon Well, I believe we have no precedent of importing private modules between What do you think of refactoring "lab" and "icons" to follow the approach of "pickers"? I would reduce the bundle size (deduplication for private usage). |
It's kind of util that could be reused between different internal packages but also outside - like in my project where I need to create several custom icons. |
@darkowic For the public aspect, I think that we could delay the effort to a point where we have more user requests. Also, I think that we should look into how it fits with the SVGR ecosystem before moving forward. |
Summary 💡
Export
createSvgIcon
function from@material-ui/icons
to be able to create custom icons while reusing thecreateSvgIcon
function.Examples 🌈
Motivation 🔦
It would be great to reuse the
createSvgIcon
function in other projects. It is possible to import the function bybut it is an internal function so the API may change anytime soon without any warning.
The text was updated successfully, but these errors were encountered: