@@ -4,7 +4,7 @@ import { getIconCSS } from '@iconify/utils/lib/css/icon'
44import type { PropType } from 'vue'
55import type { IconifyIcon } from '@iconify/types'
66import type { NuxtIconRuntimeOptions , NuxtIconRuntimeServerOptions , IconifyIconCustomizeCallback } from '../../types'
7- import { loadIcon } from './shared'
7+ import { loadIcon , resolveCustomizeFn } from './shared'
88import { useAppConfig , useNuxtApp , useHead , useRuntimeConfig , onServerPrefetch } from '#imports'
99
1010// This should only be used in the client side
@@ -72,7 +72,8 @@ export const NuxtIconCss = /* @__PURE__ */ defineComponent({
7272 required : true ,
7373 } ,
7474 customize : {
75- type : Function as PropType < IconifyIconCustomizeCallback > ,
75+ type : [ Function , Boolean , null ] as PropType < IconifyIconCustomizeCallback | boolean | null > ,
76+ default : null ,
7677 required : false ,
7778 } ,
7879 } ,
@@ -101,10 +102,11 @@ export const NuxtIconCss = /* @__PURE__ */ defineComponent({
101102 if ( options . cssWherePseudo ) {
102103 iconSelector = `:where(${ iconSelector } )`
103104 }
105+
104106 const css = getIconCSS ( icon , {
105107 iconSelector,
106108 format : 'compressed' ,
107- customise : props . customize ?? options . customize ,
109+ customise : resolveCustomizeFn ( props . customize , options . customize ) ,
108110 } )
109111 if ( options . cssLayer && withLayer ) {
110112 return `@layer ${ options . cssLayer } { ${ css } }`
0 commit comments