Refactor #3832 Refactor #3833 - For Button

This commit is contained in:
mertsincan 2023-04-13 12:19:28 +03:00
parent 0b3dd893cb
commit bcb93b534d
3 changed files with 56 additions and 10 deletions

View file

@ -54,7 +54,6 @@ export interface ButtonProps extends ButtonHTMLAttributes {
loading?: boolean | undefined;
/**
* Icon to display in loading state.
* @defaultValue pi pi-spinner pi-spin
*/
loadingIcon?: string | undefined;
/**
@ -105,6 +104,26 @@ export interface ButtonSlots {
* Custom content such as icons, images and text can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included.
*/
default(): VNode[];
/**
* Custom icon template.
* @param {Object} scope - icon slot's params.
*/
icon(scope: {
/**
* Style class of the icon.
*/
class: string;
}): VNode[];
/**
* Custom loading icon template.
* @param {Object} scope - loading icon slot's params.
*/
loadingicon(scope: {
/**
* Style class of the loading icon.
*/
class: string;
}): VNode[];
}
/**