1 1
// Extensions
2 1
import { Service } from '../service'
3

4
// Utilities
5 1
import { mergeDeep } from '../../util/helpers'
6

7
// Types
8
import { VuetifyPreset } from 'vuetify/types/services/presets'
9
import { Icons as IIcons } from 'vuetify/types/services/icons'
10

11
// Presets
12 1
import presets from './presets'
13

14 1
export class Icons extends Service implements IIcons {
15 1
  static property: 'icons' = 'icons'
16

17
  public iconfont: IIcons['iconfont']
18

19
  public values: IIcons['values']
20

21
  public component: IIcons['component']
22

23 1
  constructor (preset: VuetifyPreset) {
24 1
    super()
25

26
    const {
27 1
      iconfont,
28 1
      values,
29 1
      component,
30 1
    } = preset[Icons.property]
31

32 1
    this.component = component
33 1
    this.iconfont = iconfont
34 1
    this.values = mergeDeep(
35
      presets[iconfont],
36
      values
37
    ) as IIcons['values']
38
  }
39 1
}

Read our documentation on viewing source code .

Loading