marc-leopold/components/GalleryImageViewer.vue

59 lines
795 B
Vue

<template>
<div class="image-viewer"
:class="{ 'is-visible': isVisible }">
<div class="close-viewer"
@click="$emit('close')">
X
</div>
</div>
</template>
<script>
export default {
props: {
isVisible: {
type: Boolean,
required: true
}
},
data () {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.image-viewer {
background: linear-gradient(
to bottom left,
magenta,
cyan
); // TEMP
}
@media (max-width: $bp__layout) {
.close-viewer {
font-size: 10em;
cursor: pointer;
}
.image-viewer {
z-index: 50;
transition: opacity 1s; //TEMP
opacity: 0;
pointer-events: none;
&.is-visible {
opacity: 1;
pointer-events: auto;
}
}
}
</style>