1
import { VuetifyIcons } from 'vuetify/types/services/icons'
2
import { Component } from 'vue'
3 1
import icons from './fa'
4

5 1
export function convertToComponentDeclarations (
6
  component: Component | string,
7 1
  iconSet: VuetifyIcons,
8
) {
9 1
  const result: Partial<VuetifyIcons> = {}
10

11 1
  for (const key in iconSet) {
12 1
    result[key] = {
13
      component,
14
      props: {
15
        icon: (iconSet[key] as string).split(' fa-'),
16
      },
17
    }
18
  }
19

20 1
  return result as VuetifyIcons
21
}
22

23 1
export default convertToComponentDeclarations('font-awesome-icon', icons)

Read our documentation on viewing source code .

Loading