2021-10-13 03:07:42 +02:00
|
|
|
<template>
|
2022-03-04 02:03:34 +01:00
|
|
|
<div :class="`h-${size} w-${size}`">
|
|
|
|
<component :is="iconComponentName" />
|
2021-10-13 03:07:42 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2022-03-04 02:03:34 +01:00
|
|
|
icon: String,
|
|
|
|
size: {
|
|
|
|
type: Number,
|
|
|
|
default: 5
|
|
|
|
}
|
2021-10-13 03:07:42 +02:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {}
|
|
|
|
},
|
2022-03-04 02:03:34 +01:00
|
|
|
computed: {
|
|
|
|
iconComponentName() {
|
|
|
|
if (this.icon === 'default') return `icons-database-svg`
|
|
|
|
return `icons-${this.icon}-svg`
|
|
|
|
}
|
|
|
|
},
|
2021-10-13 03:07:42 +02:00
|
|
|
methods: {},
|
|
|
|
mounted() {}
|
|
|
|
}
|
|
|
|
</script>
|