Skip to content

Commit

Permalink
fix(toast): adds option to remove backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Apr 25, 2016
1 parent 9d4ded1 commit 5d7128a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ionic/components/toast/toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class Toast extends ViewController {
@Component({
selector: 'ion-toast',
template: `
<div (click)="bdClick()" tappable disable-activated class="backdrop" role="presentation"></div>
<div *ngIf="!hideBackDrop" (click)="bdClick()" tappable disable-activated class="backdrop" role="presentation"></div>
<div class="toast-wrapper">
<div class="toast-container">
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
Expand All @@ -144,11 +144,12 @@ export class Toast extends ViewController {
directives: [NgIf, Icon, Button]
})
class ToastCmp {
private d: any;
private d: ToastOptions;
private descId: string;
private hdrId: string;
private created: number;
private id: number;
private hideBackDrop: boolean = false;
private dismissTimeout: number = undefined;

constructor(
Expand All @@ -171,6 +172,9 @@ class ToastCmp {
if (this.d.message) {
this.hdrId = 'toast-hdr-' + this.id;
}
if (this.d.hideBackDrop) {
this.hideBackDrop = this.d.hideBackDrop;
}
}

onPageDidEnter() {
Expand Down Expand Up @@ -223,6 +227,7 @@ export interface ToastOptions {
message?: string;
cssClass?: string;
duration?: number;
hideBackDrop?: boolean;
showCloseButton?: boolean;
closeButtonText?: string;
enableBackdropDismiss?: boolean;
Expand Down

0 comments on commit 5d7128a

Please sign in to comment.