@@ -132,16 +141,28 @@ export default {
return this.confirmation ? this.confirmation.position : null;
},
acceptLabel() {
- return this.confirmation ? this.confirmation.acceptLabel || this.acceptButtonProps.label || this.$primevue.config.locale.accept : null;
+ if (this.confirmation) {
+ const confirmation = this.confirmation;
+
+ return confirmation.acceptLabel ? confirmation.acceptLabel : confirmation.acceptProps ? confirmation.acceptProps.label || this.$primevue.config.locale.accept : null;
+ }
+
+ return null;
},
rejectLabel() {
- return this.confirmation ? this.confirmation.rejectLabel || this.rejectButtonProps.label || this.$primevue.config.locale.reject : null;
+ if (this.confirmation) {
+ const confirmation = this.confirmation;
+
+ return confirmation.rejectLabel ? confirmation.rejectLabel : confirmation.rejectProps ? confirmation.rejectProps.label || this.$primevue.config.locale.reject : null;
+ }
+
+ return null;
},
acceptIcon() {
- return this.confirmation ? this.confirmation.acceptIcon : null;
+ return this.confirmation ? this.confirmation.acceptIcon : this.confirmation?.acceptProps ? this.confirmation.acceptProps.icon : null;
},
rejectIcon() {
- return this.confirmation ? this.confirmation.rejectIcon : null;
+ return this.confirmation ? this.confirmation.rejectIcon : this.confirmation?.rejectProps ? this.confirmation.rejectProps.icon : null;
},
autoFocusAccept() {
return this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept' ? true : false;
diff --git a/components/lib/confirmpopup/BaseConfirmPopup.vue b/components/lib/confirmpopup/BaseConfirmPopup.vue
index 979939758..09b2ceca6 100644
--- a/components/lib/confirmpopup/BaseConfirmPopup.vue
+++ b/components/lib/confirmpopup/BaseConfirmPopup.vue
@@ -6,24 +6,7 @@ export default {
name: 'BaseConfirmPopup',
extends: BaseComponent,
props: {
- group: String,
- rejectButtonProps: {
- type: Object,
- default() {
- return {
- size: 'small',
- text: true
- };
- }
- },
- acceptButtonProps: {
- type: Object,
- default() {
- return {
- size: 'small'
- };
- }
- }
+ group: String
},
style: ConfirmPopupStyle,
provide() {
diff --git a/components/lib/confirmpopup/ConfirmPopup.d.ts b/components/lib/confirmpopup/ConfirmPopup.d.ts
index 5049bdd4b..f9769896f 100644
--- a/components/lib/confirmpopup/ConfirmPopup.d.ts
+++ b/components/lib/confirmpopup/ConfirmPopup.d.ts
@@ -9,7 +9,7 @@
*/
import { TransitionProps, VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
-import { ButtonPassThroughOptions, ButtonProps } from '../button';
+import { ButtonPassThroughOptions } from '../button';
import { ConfirmationOptions } from '../confirmationoptions';
import { PassThroughOptions } from '../passthrough';
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
@@ -138,18 +138,6 @@ export interface ConfirmPopupProps {
* Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance.
*/
group?: string;
- /**
- * Used to pass all properties of the ButtonProps to the reject button inside the component.
- * @type {ButtonProps}
- * @defaultValue { size: 'small', text: true }
- */
- rejectButtonProps?: object | undefined;
- /**
- * Used to pass all properties of the ButtonProps to the accept button inside the component.
- * @type {ButtonProps}
- * @defaultValue { size: 'small' }
- */
- acceptButtonProps?: object | undefined;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {ConfirmPopupPassThroughOptions}
diff --git a/components/lib/confirmpopup/ConfirmPopup.vue b/components/lib/confirmpopup/ConfirmPopup.vue
index e323402f8..d39eb3cb4 100644
--- a/components/lib/confirmpopup/ConfirmPopup.vue
+++ b/components/lib/confirmpopup/ConfirmPopup.vue
@@ -16,16 +16,16 @@