diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/assets/javascripts/init_confirm_danger.js | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/init_confirm_danger.js')
-rw-r--r-- | app/assets/javascripts/init_confirm_danger.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/assets/javascripts/init_confirm_danger.js b/app/assets/javascripts/init_confirm_danger.js index a8833a17467..98bfa48740c 100644 --- a/app/assets/javascripts/init_confirm_danger.js +++ b/app/assets/javascripts/init_confirm_danger.js @@ -1,4 +1,5 @@ import Vue from 'vue'; +import { pickBy } from 'lodash'; import { parseBoolean } from './lib/utils/common_utils'; import ConfirmDanger from './vue_shared/components/confirm_danger/confirm_danger.vue'; @@ -12,21 +13,32 @@ export default () => { buttonText, buttonClass = '', buttonTestid = null, + buttonVariant = null, confirmDangerMessage, + confirmButtonText = null, disabled = false, + additionalInformation, + htmlConfirmationMessage, } = el.dataset; return new Vue({ el, - provide: { - confirmDangerMessage, - }, + provide: pickBy( + { + htmlConfirmationMessage, + confirmDangerMessage, + additionalInformation, + confirmButtonText, + }, + (v) => Boolean(v), + ), render: (createElement) => createElement(ConfirmDanger, { props: { phrase, buttonText, buttonClass, + buttonVariant, buttonTestid, disabled: parseBoolean(disabled), }, |