Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (26 sloc) 436 Bytes
<template>
<svg class="icon" :class="iconClass">
<use :xlink:href="Icons[name]"></use>
</svg>
</template>
<script>
import Icons from 'src/assets/icons'
export default {
props: {
name: {
type: String,
required: true,
default: '',
validator (val) {
return Icons[val]
}
}
},
data () {
return {
Icons: Icons,
iconClass: 'icon-' + this.name
}
}
}
</script>
You can’t perform that action at this time.