gitFoxCode / nuxt-icons

Module for Nuxt allowing pleasant use of svg icons
187 stars 23 forks source link

Prop type failed for prop "name" #15

Closed meleshkevich closed 1 year ago

meleshkevich commented 1 year ago

Hi there, thanks for great work! Just want to ask if there is possibility to specify type props for name, since using conditional icon rendering with <nuxt-icon :name="[ SomeCondition ?IconName-1 :IconName-2, ]" getting errors in console. Of course there are workarounds for that, but I am just curioous, if prop types could be somehow specified for name. Thank you!

gitFoxCode commented 1 year ago

Hi, sorry for the late reply, of course it is possible to use, but not as arrays: <nuxt-icon :name="someCondition === true ? 'myiconnameiftrue' : 'myiconnameiffalse'" />