mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
14 lines
308 B
TypeScript
14 lines
308 B
TypeScript
import { Icon } from '@iconify/vue'
|
|
import { NIcon } from 'naive-ui'
|
|
import { h } from 'vue'
|
|
|
|
interface Props {
|
|
size?: number
|
|
color?: string
|
|
class?: string
|
|
}
|
|
|
|
export function renderIcon(icon: string, props: Props = { size: 12 }) {
|
|
return () => h(NIcon, props, { default: () => h(Icon, { icon }) })
|
|
}
|