Skip to content

Commit

Permalink
Fixed #5028 - ConfirmDialog & ConfirmPopup: icon option class pt impl…
Browse files Browse the repository at this point in the history
…ementation defect
  • Loading branch information
tugcekucukoglu committed Jan 4, 2024
1 parent aa5336f commit 1332351
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/lib/confirmdialog/ConfirmDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<template v-if="!$slots.message">
<slot name="icon">
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
<span v-else-if="confirmation.icon" :class="cx('icon')" v-bind="ptm('icon')" />
<span v-else-if="confirmation.icon" :class="[confirmation.icon, cx('icon')]" v-bind="ptm('icon')" />
</slot>
<span :class="cx('message')" v-bind="ptm('message')">{{ message }}</span>
</template>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/confirmdialog/style/ConfirmDialogStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import BaseStyle from 'primevue/base/style';

const classes = {
root: 'p-confirm-dialog',
icon: ({ instance }) => ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null],
icon: 'p-confirm-dialog-icon',
message: 'p-confirm-dialog-message',
rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-text' : null],
acceptButton: 'p-confirm-dialog-accept'
Expand Down
2 changes: 1 addition & 1 deletion components/lib/confirmpopup/ConfirmPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div :class="cx('content')" v-bind="ptm('content')">
<slot name="icon">
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
<span v-else-if="confirmation.icon" :class="cx('icon')" v-bind="ptm('icon')" />
<span v-else-if="confirmation.icon" :class="[confirmation.icon, cx('icon')]" v-bind="ptm('icon')" />
</slot>
<span :class="cx('message')" v-bind="ptm('message')">{{ confirmation.message }}</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/confirmpopup/style/ConfirmPopupStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const classes = {
}
],
content: 'p-confirm-popup-content',
icon: ({ instance }) => ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null],
icon: 'p-confirm-popup-icon',
message: 'p-confirm-popup-message',
footer: 'p-confirm-popup-footer',
rejectButton: ({ instance }) => ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null],
Expand Down

0 comments on commit 1332351

Please sign in to comment.