Is it possible to store icons in CSS files and dynamically load them based on props passed into a component?
In the provided example found at this CodeSandbox Link, SVG icons are loaded from the library named '@progress/kendo-svg-icons'
.
Instead of loading icons directly from the library, is there a way to store these icons in a CSS file and inject them into components based on custom props?
For instance, in the following hypothetical scenario:
import from './ButtonStyles.css'
...
<React.Fragment>
....
<button icon="eyeIcon">Hello</button>
....
</React.Fragment>
Is there a method to achieve this functionality? Any sample code demonstrating this concept would be greatly appreciated.