mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
refactor(toast): remove showCloseButton and closeButtonText (#18957)
* Remove close button * update tests * update tests * add build
This commit is contained in:
committed by
Brandy Carney
parent
f742dc5519
commit
d6c20a9dec
@ -86,16 +86,6 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
*/
|
||||
@Prop() position: 'top' | 'bottom' | 'middle' = 'bottom';
|
||||
|
||||
/**
|
||||
* @deprecated Use `buttons` instead. If `true`, the close button will be displayed.
|
||||
*/
|
||||
@Prop() showCloseButton = false;
|
||||
|
||||
/**
|
||||
* @deprecated Use `buttons` instead. Text to display in the close button.
|
||||
*/
|
||||
@Prop() closeButtonText?: string;
|
||||
|
||||
/**
|
||||
* An array of buttons for the toast.
|
||||
*/
|
||||
@ -191,15 +181,6 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
})
|
||||
: [];
|
||||
|
||||
// tslint:disable-next-line: deprecation
|
||||
if (this.showCloseButton) {
|
||||
buttons.push({
|
||||
// tslint:disable-next-line: deprecation
|
||||
text: this.closeButtonText || 'Close',
|
||||
handler: () => this.dismiss(undefined, 'cancel')
|
||||
});
|
||||
}
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user