therufa / mdi-vue

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

vue 3 can not make kebab-case named icons work #48

Closed Zony-Zhao closed 3 years ago

Zony-Zhao commented 3 years ago

I managed to use<mdicon name="account" /> , but failed at both <mdicon name="format-text" /> and <mdicon name="format-Text" />

therufa commented 3 years ago

Hi @Zony-Zhao, thanks for pointing this out. Even though this is not a bug it's very inconvenient. You see, in https://github.com/Templarian/MaterialDesign-JS/blob/master/mdi.js the names are camelCase therefore the name prop should be camel case as well, meaning that <mdicon name="formatText" /> should work. (See https://github.com/therufa/mdi-vue/blob/master/main.js#L19)

I'll add a patch soon which will allow to use the component more intuitively, until then I'd suggest to simply go for camel or pascal case.

Thanks again

therufa commented 3 years ago

@Zony-Zhao I released an upgrade, now it should work now with the format you've tried initially.