Skip to content

Commit

Permalink
chore: rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 20, 2024
1 parent 3bb5957 commit f116b7c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/runtime/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ export default defineComponent({
},
async setup(props, { slots }) {
const nuxtApp = useNuxtApp()
const options = useAppConfig().icon as NuxtIconRuntimeOptions
const runtimeOptions = useAppConfig().icon as NuxtIconRuntimeOptions
const name = useResolvedName(() => props.name)
const component = computed(() =>
nuxtApp.vueApp?.component(name.value)
|| ((props.mode || options.mode) === 'svg'
|| ((props.mode || runtimeOptions.mode) === 'svg'
? NuxtIconSvg
: NuxtIconCss),
)
const style = computed(() => {
const size = props.size || options.size
const size = props.size || runtimeOptions.size
return size
? { fontSize: Number.isNaN(+size) ? size : size + 'px' }
: null
})
const customize = props.customize || options.customize
const customize = props.customize || runtimeOptions.customize

return () => h(
component.value,
{
...options.attrs,
...runtimeOptions.attrs,
name: name.value,
class: options.class,
class: runtimeOptions.class,
style: style.value,
customize,
},
Expand Down

0 comments on commit f116b7c

Please sign in to comment.