diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-08 18:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-08 18:09:10 +0300 |
commit | a74cb0526c088bf5868f5aba1aec949800c1d641 (patch) | |
tree | e30827d0d46a9b2f35fc86bb9deaa8876b362ba7 /app/assets | |
parent | e2f984e14e1fd34e5105669c4306388019e6b5b6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/settings/settings_block.vue | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/components/settings/settings_block.vue b/app/assets/javascripts/vue_shared/components/settings/settings_block.vue index 92ae4575c52..e8f517f40a6 100644 --- a/app/assets/javascripts/vue_shared/components/settings/settings_block.vue +++ b/app/assets/javascripts/vue_shared/components/settings/settings_block.vue @@ -29,14 +29,29 @@ export default { return this.expanded ? __('Collapse') : __('Expand'); }, }, + methods: { + toggleSectionExpanded() { + this.sectionExpanded = !this.sectionExpanded; + }, + }, }; </script> <template> <section class="settings" :class="{ 'no-animate': !slideAnimated, expanded }"> <div class="settings-header"> - <h4><slot name="title"></slot></h4> - <gl-button @click="sectionExpanded = !sectionExpanded"> + <h4> + <span + role="button" + tabindex="0" + class="gl-cursor-pointer" + data-testid="section-title" + @click="toggleSectionExpanded" + > + <slot name="title"></slot> + </span> + </h4> + <gl-button @click="toggleSectionExpanded"> {{ toggleText }} </gl-button> <p> |