10 changed files with 19 additions and 24 deletions
@ -0,0 +1,9 @@ |
|||
import { h } from 'vue'; |
|||
|
|||
import { Icon } from '@iconify/vue'; |
|||
|
|||
function createIcon(icon: string) { |
|||
return h(Icon, { icon }); |
|||
} |
|||
|
|||
export { createIcon }; |
|||
@ -1,14 +0,0 @@ |
|||
import { defineComponent, h } from 'vue'; |
|||
|
|||
import { Icon } from '@iconify/vue'; |
|||
|
|||
function createIcon(name: string) { |
|||
return defineComponent({ |
|||
name: `SvgIcon-${name}`, |
|||
setup(props, { attrs }) { |
|||
return () => h(Icon, { icon: name, ...props, ...attrs }); |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
export { createIcon }; |
|||
Loading…
Reference in new issue