Follow these steps to create the <template> section of the single file component:
- First, we need to add the MaterialCardBox component with a header and sub-header, activate the media and action sections, and create the <template> named slots for media and action:
<MaterialCardBox
header="Cat as a Service"
sub-header="Random Cat Image"
show-media
show-actions
>
<template
v-slot:media>
</template>
<template v-slot:action>
</template>
</MaterialCardBox>
- In the <template> named slot for media, we need to add an <img> element that will receive a URI Blob, which will be displayed when there is any data in the kittyImage variable, or it will display a loading icon:
<img
v-if="kittyImage"
alt="Meow!"
:src="kittyImage"
style="width: 300px;"
>
<p v-else style="text-align: center">
<i class...