-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtemplate.js
67 lines (64 loc) · 1.23 KB
/
template.js
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
'use static'
module.exports = (name, path, ariaLabel) => `<template functional>
<span
:class="[data.staticClass, 'mdi', 'mdi-${name}', props.spin ? 'mdi-spin' : undefined]"
:role="props.role"
:aria-label="props.ariaLabel"
>
<svg
fill="currentColor"
:width="props.width || props.size"
:height="props.height || props.size"
:viewBox="props.viewBox"
:xmlns="props.xmlns"
>
<title v-if="title">{{ title }}</title>
<path d="${path}" />
</svg>
</span>
</template>
<script>
export default {
name: 'mdi-${name}',
props: {
width: {
type: [Number, String],
default: null
},
height: {
type: [Number, String],
default: null
},
size: {
type: [Number, String],
default: 24
},
viewBox: {
type: [String],
default: '0 0 24 24'
},
xmlns: {
type: String,
default: 'http://www.w3.org/2000/svg'
},
ariaLabel: {
type: String,
default: '${ariaLabel} icon'
},
role: {
type: String,
default: 'img'
},
title: {
type: String,
required: false
},
spin: {
type: Boolean,
default: false
}
}
}
</script>
<style src="./icons.css"/>
`