49 lines
717 B
Vue
49 lines
717 B
Vue
<script setup>
|
|
import { onMounted } from 'vue';
|
|
|
|
const emit = defineEmits(['closeWish']);
|
|
const props = defineProps({
|
|
selected: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
wish: Object,
|
|
});
|
|
|
|
function handleClose(event) {
|
|
if (event.key == 'Escape') emit('closeWish');
|
|
}
|
|
|
|
onMounted(() => {
|
|
window.addEventListener('keydown', handleClose);
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="panel-container main-panel">
|
|
<h1>{{ wish.title }}</h1>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="css" scoped>
|
|
|
|
.main-panel {
|
|
width: 100%;
|
|
margin: 30px;
|
|
|
|
border-radius: 10px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2vh;
|
|
}
|
|
|
|
|
|
.panel-container {
|
|
top: 50%;
|
|
left: 50%;
|
|
|
|
z-index: 100;
|
|
}
|
|
</style> |