-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
67 lines (64 loc) · 1.78 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import type { IconAliases, IconSet } from 'vuetify'
import { h } from 'vue'
const aliases = <IconAliases>{
/* custom ones */
email: 'mdi:email',
/* vuetify aliases */
collapse: 'mdi:chevron-up',
complete: 'mdi:check',
cancel: 'mdi:close-circle',
close: 'mdi:close',
delete: 'mdi:close-circle',
// delete (e.g. v-chip close)
clear: 'mdi:close-circle',
success: 'mdi:check-circle',
info: 'mdi:information',
warning: 'mdi:alert-circle',
error: 'mdi:close-circle',
prev: 'mdi:chevron-left',
next: 'mdi:chevron-right',
checkboxOn: 'mdi-checkbox-marked',
checkboxOff: 'mdi-checkbox-blank-outline',
checkboxIndeterminate: 'mdi:minus-box',
delimiter: 'mdi:circle',
// for carousel
sortAsc: 'mdi:arrow-up',
sortDesc: 'mdi:arrow-down',
expand: 'mdi:chevron-down',
menu: 'mdi:menu',
subgroup: 'mdi:menu-down',
dropdown: 'mdi-menu-down',
radioOn: 'mdi-radiobox-marked',
radioOff: 'mdi-radiobox-blank',
edit: 'mdi:pencil',
ratingEmpty: 'mdi:star-outline',
ratingFull: 'mdi:star',
ratingHalf: 'mdi:star-half-full',
loading: 'mdi:cached',
first: 'mdi:page-first',
last: 'mdi:page-last',
unfold: 'mdi:unfold-more-horizontal',
file: 'mdi:paperclip',
plus: 'mdi:plus',
minus: 'mdi:minus',
calendar: 'mdi:calendar',
$checkboxOn: 'mdi-checkbox-marked',
$checkboxOff: 'mdi-checkbox-blank-outline',
}
const iconify = <IconSet>{
// @ts-expect-error Parameter props implicitly has an any type.
component: (props) => {
// eslint-disable-next-line no-console
console.log(props)
const { icon, tag, ...rest } = props
const stringIcon = icon as string
return h(tag, rest, [
h('iconify-icon', {
key: stringIcon,
icon: aliases[icon as string] ?? icon,
...rest,
}),
])
},
}
export { aliases, iconify }