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 {
components: {
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>
......@@ -71,12 +87,13 @@ export default {
v-if="includeToggle"
class="discussion-actions">
<button
@click="toggleHandler"
@click="handleToggle"
class="note-action-button discussion-toggle-button js-toggle-button"
type="button">
<i
aria-hidden="true"
class="fa fa-chevron-up"></i>
:class="toggleChevronClass"
class="fa"
aria-hidden="true"></i>
Toggle discussion
</button>
</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