Confirm Dialog: allow changing the button text

pull/145/head
LouisLam 2 years ago
parent 659d83b13c
commit 642a711bcd
  1. 3
      .editorconfig
  2. 12
      src/components/Confirm.vue

@ -16,3 +16,6 @@ indent_size = 2
[*.yml]
indent_size = 2
[*.vue]
trim_trailing_whitespace = false

@ -13,10 +13,10 @@
</div>
<div class="modal-footer">
<button type="button" class="btn" :class="btnStyle" data-bs-dismiss="modal" @click="yes">
Yes
{{ yesText }}
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
No
{{ noText }}
</button>
</div>
</div>
@ -33,6 +33,14 @@ export default {
type: String,
default: "btn-primary",
},
yesText: {
type: String,
default: "Yes",
},
noText: {
type: String,
default: "No",
},
},
data: () => ({
modal: null,

Loading…
Cancel
Save