therufa / mdi-vue

Material design icons for vue.js
https://www.npmjs.com/package/mdi-vue
MIT License
88 stars 13 forks source link

Support custom classes on icons #23

Closed Marivaldi closed 5 years ago

Marivaldi commented 5 years ago

Since switching the template to be functional, the icon components can no longer accept a custom class on its containing element. Currently the only way to change the color of an icon is to wrap it in another element and give that element the desired CSS color. It would help reduce the number of DOM elements required if you could add a class directly to the span.

<span :class="['mdi', 'mdi-${name}', data.class, data.staticClass]" :role="props.role" :aria-label="props.ariaLabel">

therufa commented 5 years ago

@Marivaldi thanks for your effort of opening the issue. I'll add this change to the next patch

therufa commented 5 years ago

I've released a new patch with the version number v1.2.1