mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3885 - button updates
This commit is contained in:
parent
21ab0ad7d0
commit
cadc7e87c4
8 changed files with 32 additions and 47 deletions
15
components/lib/confirmpopup/ConfirmPopup.d.ts
vendored
15
components/lib/confirmpopup/ConfirmPopup.d.ts
vendored
|
@ -8,6 +8,7 @@
|
|||
*
|
||||
*/
|
||||
import { VNode } from 'vue';
|
||||
import { ButtonPassThroughOptions } from '../button';
|
||||
import { ConfirmationOptions } from '../confirmationoptions';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
|
@ -48,20 +49,14 @@ export interface ConfirmPopupPassThroughOptions {
|
|||
footer?: ConfirmPopupPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the reject button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
rejectButton?: ConfirmPopupPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the reject icon's DOM element.
|
||||
*/
|
||||
rejectIcon?: ConfirmPopupPassThroughOptionType;
|
||||
rejectButton?: ButtonPassThroughOptions;
|
||||
/**
|
||||
* Uses to pass attributes to the accept button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
acceptButton?: ConfirmPopupPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the accept icon's DOM element.
|
||||
*/
|
||||
acceptIcon?: ConfirmPopupPassThroughOptionType;
|
||||
acceptButton?: ButtonPassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,17 +13,17 @@
|
|||
</template>
|
||||
<component v-else :is="$slots.message" :message="confirmation"></component>
|
||||
<div class="p-confirm-popup-footer" v-bind="ptm('footer')">
|
||||
<CPButton :label="rejectLabel" :class="rejectClass" @click="reject()" @keydown="onRejectKeydown" :autofocus="autoFocusReject" v-bind="ptm('rejectButton')">
|
||||
<CPButton :label="rejectLabel" :class="rejectClass" @click="reject()" @keydown="onRejectKeydown" :autofocus="autoFocusReject" :pt="ptm('rejectButton')">
|
||||
<template #icon="iconProps">
|
||||
<slot name="rejecticon">
|
||||
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectIcon')" />
|
||||
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectButton')['icon']" />
|
||||
</slot>
|
||||
</template>
|
||||
</CPButton>
|
||||
<CPButton :label="acceptLabel" :class="acceptClass" @click="accept()" @keydown="onAcceptKeydown" :autofocus="autoFocusAccept" v-bind="ptm('acceptButton')">
|
||||
<CPButton :label="acceptLabel" :class="acceptClass" @click="accept()" @keydown="onAcceptKeydown" :autofocus="autoFocusAccept" :pt="ptm('acceptButton')">
|
||||
<template #icon="iconProps">
|
||||
<slot name="accepticon">
|
||||
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptIcon')" />
|
||||
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptButton')['icon']" />
|
||||
</slot>
|
||||
</template>
|
||||
</CPButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue