diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-23 12:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-23 12:08:01 +0300 |
commit | c71c2ba4c29ed3cc483e528a32f34816c98c39f4 (patch) | |
tree | 56a8a8355631b9d58544bb74816082529ce0044d /app/assets/javascripts/vue_shared | |
parent | 5534414cd55a3e85d8f60e1a0883ed32f190df6b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue index 69548f0e7a8..11fcc697602 100644 --- a/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue +++ b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue @@ -52,6 +52,20 @@ export default { return {}; }, }, + /* + `inputClass` prop should be removed after https://gitlab.com/gitlab-org/gitlab/-/issues/357848 + is implemented. + */ + inputClass: { + type: String, + required: false, + default: '', + }, + qaSelector: { + type: String, + required: false, + default: undefined, + }, }, data() { return { @@ -73,6 +87,9 @@ export default { displayedValue() { return this.computedValueIsVisible ? this.value : '*'.repeat(this.value.length || 20); }, + classInput() { + return `gl-font-monospace! gl-cursor-default! ${this.inputClass}`.trimEnd(); + }, }, methods: { handleToggleVisibilityButtonClick() { @@ -98,7 +115,8 @@ export default { <gl-form-group v-bind="$attrs"> <gl-form-input-group :value="displayedValue" - input-class="gl-font-monospace! gl-cursor-default!" + :input-class="classInput" + :data-qa-selector="qaSelector" select-on-click readonly v-bind="formInputGroupProps" |