The code doesn't work as you are passing a string into the component as a prop, rather of the actual Vue component
What you can do is to try to store all the components in a JS Object with IDs assigned to it and use a function to call them. An Example code will be like this →
<script setup>
import LoadingIcon from './LoadingIcon.vue';
import HomeIcon from './HomeIcon.vue';
const iconComponentData = {
'IconPlasmid':HomeIcon,
'loading':LoadingIcon
}
function returnProperIcon (key){
return iconComponentData[key]
}
</script>
<template>
<component :is="returnProperIcon('Icon' + 'Plasmid')"></component>
</template>
Welcome to the Vue Ecosystem, Happy coding !