refactor(toast): remove showCloseButton and closeButtonText (#18957)

* Remove close button

* update tests

* update tests

* add build
This commit is contained in:
Liam DeBeasi
2019-08-20 10:03:18 -04:00
committed by Brandy Carney
parent f742dc5519
commit d6c20a9dec
10 changed files with 32 additions and 88 deletions

View File

@ -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;
}