Skip to content

Commit

Permalink
feat: create eventOnly prop setting
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Nov 19, 2021
1 parent befc752 commit c28e106
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions components/pages/posts/post/Post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,15 @@
<!-- Tags -->
<div class="min-w-full tag-container">
<template v-for="tag in post.data.tags">
<template v-if="viewOnly">
<span :key="tag" class="tag link">
<template v-if="eventOnly">
<button
:key="tag"
class="tag link"
type="button"
@click="emitTagSelected(tag)"
>
{{ tag }}
</span>
</button>
</template>

<template v-else>
Expand Down Expand Up @@ -215,7 +220,7 @@ export default {
required: true,
},
viewOnly: {
eventOnly: {
type: Boolean,
default: false,
},
Expand Down Expand Up @@ -328,6 +333,10 @@ export default {
this.isActive = !this.isActive
},
emitTagSelected(tag) {
this.$emit('tag-selected', tag)
},
// #region Post media
async retryToLoadManager(event) {
// console.log('Media source: ', event.target.src)
Expand Down

0 comments on commit c28e106

Please sign in to comment.