Revert Toast button updates
parent
cf8f24d097
commit
9b95710cf6
|
@ -47,10 +47,8 @@ export default {
|
|||
default: undefined
|
||||
},
|
||||
closeButtonProps: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
type: null,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
style: ToastStyle,
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
* @module toast
|
||||
*
|
||||
*/
|
||||
import { TransitionProps, VNode } from 'vue';
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { ButtonPassThroughOptions } from '../button';
|
||||
import { ButtonHTMLAttributes, TransitionProps, VNode } from 'vue';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
|
||||
|
@ -47,20 +45,6 @@ export interface ToastPassThroughMethodOptions {
|
|||
global: object | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom shared passthrough(pt) option method.
|
||||
*/
|
||||
export interface ToastSharedPassThroughMethodOptions {
|
||||
/**
|
||||
* Defines valid properties.
|
||||
*/
|
||||
props: ToastProps;
|
||||
/**
|
||||
* Defines current inline state.
|
||||
*/
|
||||
state: ToastState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) options.
|
||||
* @see {@link ToastProps.pt}
|
||||
|
@ -99,17 +83,14 @@ export interface ToastPassThroughOptions {
|
|||
*/
|
||||
buttonContainer?: ToastPassThroughOptionType;
|
||||
/**
|
||||
* /**
|
||||
* Used to pass attributes to the button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
* @deprecated since v3.30.2. Use 'closeButton' option.
|
||||
*/
|
||||
button?: ButtonPassThroughOptions<ToastSharedPassThroughMethodOptions>;
|
||||
button?: ToastPassThroughOptionType;
|
||||
/**
|
||||
* /**
|
||||
* Used to pass attributes to the close button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
* Used to pass attributes to the button's DOM element.
|
||||
*/
|
||||
closeButton?: ButtonPassThroughOptions<ToastSharedPassThroughMethodOptions>;
|
||||
closeButton?: ToastPassThroughOptionType;
|
||||
/**
|
||||
* Used to pass attributes to the button icon's DOM element.
|
||||
*/
|
||||
|
@ -251,10 +232,10 @@ export interface ToastProps {
|
|||
*/
|
||||
successIcon?: string | undefined;
|
||||
/**
|
||||
* Used to pass attributes to the close Button component.
|
||||
* @defaultValue {}
|
||||
* Used to pass all properties of the HTMLButtonElement to the close button.
|
||||
* @deprecated since v3.26.0. Use 'pt' property.
|
||||
*/
|
||||
closeButtonProps?: object | undefined;
|
||||
closeButtonProps?: ButtonHTMLAttributes | undefined;
|
||||
/**
|
||||
* Used to access message options.
|
||||
* @type {ToastMessageOptions}
|
||||
|
|
|
@ -11,11 +11,9 @@
|
|||
</template>
|
||||
<component v-else :is="templates.message" :message="message"></component>
|
||||
<div v-if="message.closable !== false" v-bind="ptm('buttonContainer')">
|
||||
<Button :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="onCloseClick" autofocus :unstyled="unstyled" v-bind="closeButtonProps" :pt="{ ...ptm('button'), ...ptm('closeButton') }">
|
||||
<template #icon="slotProps">
|
||||
<component :is="templates.closeicon || 'TimesIcon'" :class="[cx('closeIcon'), closeIcon, slotProps.class]" v-bind="{ ...ptm('buttonIcon')['icon'], ...ptm('closeIcon')['icon'] }" />
|
||||
</template>
|
||||
</Button>
|
||||
<button v-ripple :class="cx('closeButton')" type="button" :aria-label="closeAriaLabel" @click="onCloseClick" autofocus v-bind="{ ...closeButtonProps, ...ptm('button'), ...ptm('closeButton') }">
|
||||
<component :is="templates.closeicon || 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="{ ...ptm('buttonIcon'), ...ptm('closeIcon') }" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +21,6 @@
|
|||
|
||||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import Button from 'primevue/button';
|
||||
import CheckIcon from 'primevue/icons/check';
|
||||
import ExclamationTriangleIcon from 'primevue/icons/exclamationtriangle';
|
||||
import InfoCircleIcon from 'primevue/icons/infocircle';
|
||||
|
@ -110,7 +107,6 @@ export default {
|
|||
}
|
||||
},
|
||||
components: {
|
||||
Button,
|
||||
TimesIcon: TimesIcon,
|
||||
InfoCircleIcon: InfoCircleIcon,
|
||||
CheckIcon: CheckIcon,
|
||||
|
|
Loading…
Reference in New Issue