workadventure/front/src/Components/Menu/MenuIcon.svelte

40 lines
966 B
Svelte
Raw Normal View History

<script lang="typescript">
2021-07-12 17:39:16 +02:00
import {menuVisible} from "../../Stores/MenuStore";
2021-07-12 17:39:16 +02:00
let isOpen : Boolean = false;
function openMenu(){
isOpen = !isOpen; //Devrait être dans le store/menuVisible.set(isOPen);/
if(isOpen) menuVisible.set(true);
else menuVisible.set(false);
}
</script>
<main class="menuIcon">
<section>
2021-07-12 17:39:16 +02:00
<button on:click|preventDefault={openMenu}>
2021-07-13 12:00:09 +02:00
<img src="/static/images/logo-WA-min.png" alt="open menu">
</button>
</section>
</main>
<style lang="scss">
.menuIcon button {
2021-07-12 17:39:16 +02:00
pointer-events: auto;
border-radius: 200px;
img {
2021-07-12 17:39:16 +02:00
width: 60px;
padding-top: 0;
2021-07-12 17:39:16 +02:00
cursor: url('/resources/logos/cursor_pointer.png'), pointer;
}
}
.menuIcon section {
2021-07-12 17:39:16 +02:00
margin: 25px;
}
@media only screen and (max-height: 700px) {
.menuIcon section {
2021-07-12 17:39:16 +02:00
margin: 100px;
}
}
</style>