Skip to content

Commit

Permalink
added close icon with event
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyliashok committed Dec 2, 2021
1 parent 1dba422 commit 54dba09
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/components/Stories.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="stories-wrapper">
<div @click="closeStories" class="close"></div>
<div class="stories">
<div
v-for="(story, index) in stories"
Expand Down Expand Up @@ -272,7 +273,10 @@ export default {
} else {
return Math.abs((315 - 315 * (index + this.difference)) * 0.5) * -1;
}
}
},
closeStories(){
this.$emit('closeStories');
},
},
mounted() {
this.play();
Expand Down Expand Up @@ -498,7 +502,25 @@ export default {
width: 100%;
background: #ffffff;
height: 2px;
}
}
.close {
position: absolute;
width: 50px;
height: 50px;
top: 20px;
right: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:after{
content: "\00d7";
color: #FFFFFF;
font-weight: 100;
font-size: 35px;
}
}
</style>

0 comments on commit 54dba09

Please sign in to comment.