wishlist-app/src/components/ImagePreview.vue
Benny Samir Hierl 618c501221 fix issue with placeholder image in darkmode
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
2022-02-12 21:43:57 +01:00

21 lines
447 B
Vue

<script setup lang="ts">
import IconImagePlaceholder from './icons/IconImagePlaceholder.vue'
defineProps({
src: {
type: String,
default: '',
},
alt: {
type: String,
default: '',
},
})
</script>
<template>
<img v-if="src" :src="src" :alt="alt" class="object-cover" />
<div v-else class="flex items-center justify-center bg-stone-100">
<IconImagePlaceholder class="h-36 w-36 fill-stone-300" />
</div>
</template>