0
0
Fork 0

Create the Modal code / apply styling

This commit is contained in:
Oliver-Akins 2020-12-08 13:56:34 -07:00
parent c813f8c9e5
commit f7a2c2a7bb
2 changed files with 34 additions and 6 deletions

View file

@ -1,17 +1,45 @@
<template> <template>
<div></div> <transition name="fade" @after-enter="content = true">
<div
v-if="show"
class="modal-container"
@click.self.stop="content = false"
>
<transition name="burst" @after-leave="$emit('close')">
<div v-if="content" class="modal">
<slot />
</div>
</transition>
</div>
</transition>
</template> </template>
<script> <script>
export default { export default {
name: ``, name: `ModalAnimation`,
components: {}, props: {
computed: {}, show: {
methods: {}, required: true,
type: Boolean,
},
},
data() {return {
content: false,
}},
} }
</script> </script>
<style> <style>
@import "css/theme.css"; @import "css/theme.css";
@import "css/style.css"; @import "css/style.css";
@import "css/transitions.css";
.modal-container {
background-color: var(--modal-background-blur);
}
.modal {
background-color: var(--modal-content-background);
color: var(--modal-content-text);
}
</style> </style>

View file

@ -48,7 +48,7 @@
/* The fill colour of the eyes on the game board */ /* The fill colour of the eyes on the game board */
--eye-colour: #000000; --eye-colour: #000000;
/* The colour that is used to bring focus towards the modal */ /* The colours for the modals */
--modal-background-blur: #000; --modal-background-blur: #000;
--modal-content-background: var(--background1); --modal-content-background: var(--background1);
--modal-content-text: var(--background1-text); --modal-content-text: var(--background1-text);