mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Refactor #3965 - For ConfirmDialog
This commit is contained in:
parent
6ce95dd393
commit
52e6aacc91
3 changed files with 51 additions and 30 deletions
31
components/lib/confirmdialog/BaseConfirmDialog.vue
Normal file
31
components/lib/confirmdialog/BaseConfirmDialog.vue
Normal file
|
@ -0,0 +1,31 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
|
||||
const classes = {
|
||||
icon: ({ instance }) => ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null],
|
||||
message: 'p-confirm-dialog-message',
|
||||
rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation ? instance.confirmation.rejectClass || 'p-button-text' : null],
|
||||
rejectButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass],
|
||||
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null],
|
||||
acceptButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass]
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'BaseConfirmDialog',
|
||||
extends: BaseComponent,
|
||||
props: {
|
||||
group: String,
|
||||
breakpoints: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue