parent
f7a93a9bb3
commit
3571511394
@ -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