I am new to VueJS. I have a component here for a banner that appears on the mobile version of my page. I would like to close it when clicking the X icon. How could I achieve this? Would I need a button instead?
<template>
<div class="mobile-banner">
<div class="container card">
<div class="row">
<div class="column one">
<drag-icon></drag-icon>
</div>
<div class="column two">
<ul>
<li>
Insctructions
</li>
</ul>
</div>
<div class="column three">
<div class="x-icon" />
</div>
</div>
</div>
</div>
</template>
Here's some style as well:
<style lang="scss" scoped>
.mobile-banner {
width: 100%;
position: fixed;
z-index: $mobile-instructions-banner;
background-color: $greyF;
color: $grey0;
}
.container {
display: flex;
justify-content: center;
}
.x-icon:before {
content: "\2715";
}
</style>