Commit d9bf04f6 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Flip toggle discussions chevron when discussion toggled.

parent 91f49069
...@@ -38,6 +38,22 @@ export default { ...@@ -38,6 +38,22 @@ export default {
components: { components: {
TimeAgoTooltip, TimeAgoTooltip,
}, },
data() {
return {
isExpanded: true,
}
},
computed: {
toggleChevronClass() {
return this.isExpanded ? 'fa-chevron-up' : 'fa-chevron-down';
},
},
methods: {
handleToggle() {
this.isExpanded = !this.isExpanded;
this.toggleHandler();
},
},
}; };
</script> </script>
...@@ -71,12 +87,13 @@ export default { ...@@ -71,12 +87,13 @@ export default {
v-if="includeToggle" v-if="includeToggle"
class="discussion-actions"> class="discussion-actions">
<button <button
@click="toggleHandler" @click="handleToggle"
class="note-action-button discussion-toggle-button js-toggle-button" class="note-action-button discussion-toggle-button js-toggle-button"
type="button"> type="button">
<i <i
aria-hidden="true" :class="toggleChevronClass"
class="fa fa-chevron-up"></i> class="fa"
aria-hidden="true"></i>
Toggle discussion Toggle discussion
</button> </button>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment