Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/popup_dialog.vue')
-rw-r--r--app/assets/javascripts/vue_shared/components/popup_dialog.vue30
1 files changed, 22 insertions, 8 deletions
diff --git a/app/assets/javascripts/vue_shared/components/popup_dialog.vue b/app/assets/javascripts/vue_shared/components/popup_dialog.vue
index 994b33bc1c9..9e8c10bdc1a 100644
--- a/app/assets/javascripts/vue_shared/components/popup_dialog.vue
+++ b/app/assets/javascripts/vue_shared/components/popup_dialog.vue
@@ -7,15 +7,20 @@ export default {
type: String,
required: true,
},
- body: {
+ text: {
type: String,
- required: true,
+ required: false,
},
kind: {
type: String,
required: false,
default: 'primary',
},
+ closeKind: {
+ type: String,
+ required: false,
+ default: 'default',
+ },
closeButtonLabel: {
type: String,
required: false,
@@ -33,6 +38,11 @@ export default {
[`btn-${this.kind}`]: true,
};
},
+ btnCancelKindClass() {
+ return {
+ [`btn-${this.closeKind}`]: true,
+ };
+ },
},
methods: {
@@ -63,20 +73,24 @@ export default {
<h4 class="modal-title">{{this.title}}</h4>
</div>
<div class="modal-body">
- <p>{{this.body}}</p>
+ <slot name="body" :text="text">
+ <p>{{text}}</p>
+ </slot>
</div>
<div class="modal-footer">
<button
type="button"
- class="btn btn-default"
- @click="emitSubmit(false)">
- {{closeButtonLabel}}
+ class="btn"
+ :class="btnCancelKindClass"
+ @click="close">
+ {{ closeButtonLabel }}
</button>
- <button type="button"
+ <button
+ type="button"
class="btn"
:class="btnKindClass"
@click="emitSubmit(true)">
- {{primaryButtonLabel}}
+ {{ primaryButtonLabel }}
</button>
</div>
</div>