@@ -18,14 +18,18 @@
Loading
18 18
19 19
  public values: IIcons['values']
20 20
21 +
  public component: IIcons['component']
22 +
21 23
  constructor (preset: VuetifyPreset) {
22 24
    super()
23 25
24 26
    const {
25 27
      iconfont,
26 28
      values,
29 +
      component,
27 30
    } = preset[Icons.property]
28 31
32 +
    this.component = component
29 33
    this.iconfont = iconfont
30 34
    this.values = mergeDeep(
31 35
      presets[iconfont],

@@ -215,16 +215,33 @@
Loading
215 215
// This remaps internal names like '$cancel' or '$vuetify.icons.cancel'
216 216
// to the current name or component for that icon.
217 217
export function remapInternalIcon (vm: Vue, iconName: string): VuetifyIcon {
218 -
  if (!iconName.startsWith('$')) {
219 -
    return iconName
218 +
  // Look for custom component in the configuration
219 +
  const component = getObjectValueByPath(vm, '$vuetify.icons.component', null)
220 +
  const usingCustomComponent = component != null
221 +
222 +
  // Look for overrides
223 +
  if (iconName.startsWith('$')) {
224 +
    // Get the target icon name
225 +
    const iconPath = `$vuetify.icons.values.${iconName.split('$').pop()!.split('.').pop()}`
226 +
227 +
    // Now look up icon indirection name,
228 +
    // e.g. '$vuetify.icons.values.cancel'
229 +
    const override = getObjectValueByPath(vm, iconPath, iconName)
230 +
231 +
    if (typeof override === 'string') iconName = override
232 +
    else return override
220 233
  }
221 234
222 -
  // Get the target icon name
223 -
  const iconPath = `$vuetify.icons.values.${iconName.split('$').pop()!.split('.').pop()}`
235 +
  if (!usingCustomComponent) {
236 +
    return iconName
237 +
  }
224 238
225 -
  // Now look up icon indirection name,
226 -
  // e.g. '$vuetify.icons.values.cancel'
227 -
  return getObjectValueByPath(vm, iconPath, iconName)
239 +
  return {
240 +
    component,
241 +
    props: {
242 +
      icon: iconName,
243 +
    },
244 +
  }
228 245
}
229 246
230 247
export function keys<O> (o: O) {
Files Coverage
packages/vuetify/src 86.46%
Project Totals (370 files) 86.46%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading