You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mdi-react uses inline SVG which makes it kinda difficult or even impossible to create a generic Icon component. For that an icon font or similar would be necessary.
I will close this for now.
But I'm curious: What's your use case you need a generic Icon component for?
I wanted to create a custom button component with a couple things wrapped around a button. Currently I'm using a switch statement to select (from a small number of icons I need) the icon that appears in the button.
Add a generic
Icon
component that takes a prop calledicon
which allows us to dynamically change the icon based on a string.The text was updated successfully, but these errors were encountered: