Export `createSvgIcon` from `@material-ui/icons`
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
Export createSvgIcon
function from @material-ui/icons
to be able to create custom icons while reusing the createSvgIcon
function.
Examples 🌈
import { createSvgIcon } from '@material-ui/icons'
Motivation 🔦
It would be great to reuse the createSvgIcon
function in other projects. It is possible to import the function by
import createSvgIcon from '@material-ui/icons/utils/createSvgIcon';
but it is an internal function so the API may change anytime soon without any warning.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Export createSvgIcon from @material-ui/icons #20268 - GitHub
Export createSvgIcon function from @material-ui/icons to be able to create custom icons while reusing the createSvgIcon function.
Read more >javascript - material-ui 'createSvgIcon' is not exported from ...
js Attempted import error: 'createSvgIcon' is not exported from '@material-ui/core/utils'. So I tried to google this problem and found another ...
Read more >React Icon Component - Material UI - MUI
For each SVG icon, we export the respective React component from the @mui/icons-material package. You can search the full list of these icons....
Read more >[Solved]-material-ui 'createSvgIcon' is not exported from ...
Coding example for the question material-ui 'createSvgIcon' is not exported from '@material-ui/core/utils'-Reactjs.
Read more >UNPKG - @material-ui/icons
1, import SvgIcon from '@material-ui/core/SvgIcon';. 2. 3, declare function createSvgIcon(path: React.ReactNode, displayName: string): typeof SvgIcon;.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eps1lon Well, I believe we have no precedent of importing private modules between
@material-ui/x
packages, but I don’t see anything wrong with it, as we can control these imports (not the case when in third-parties code) 😃.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).
@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.