I am using the Element-Ui library for the frontend of my project but the icon library for it is very scarce that is why I use Material Desing Icons for this. How could I show how to make it recognize the icon that I save in a variable. I was thinking of doing something like that but it doesn't work.
<template>
<el-button class="record-btn" v-if="isRecording" circle icon=svgPath2 @click="AudioRecorded"></el-button>
<el-button class="record-btn" v-else circle icon="svgPath1" @click="AudioRecorded" ></el-button>
</template>
<script>
import { mdiStop, mdiRecordRec } from '@mdi/js';
export default {
data () {
return {
svgPath1: mdiRecordRec,
svgPath2: mdiStop,
isRecording: false,
}
},
}
</script>