Skip to content

Commit

Permalink
fix(action-sheet): add icon-left to the button if an icon exists
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Sep 23, 2016
1 parent e26c425 commit a731528
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/action-sheet/action-sheet-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import { ViewController } from '../../navigation/view-controller';
'<div class="action-sheet-group">' +
'<div class="action-sheet-title" id="{{hdrId}}" *ngIf="d.title">{{d.title}}</div>' +
'<div class="action-sheet-sub-title" id="{{descId}}" *ngIf="d.subTitle">{{d.subTitle}}</div>' +
'<button ion-button="action-sheet-button" (click)="click(b)" *ngFor="let b of d.buttons" class="disable-hover" [ngClass]="b.cssClass">' +
'<button ion-button="action-sheet-button" (click)="click(b)" *ngFor="let b of d.buttons" class="disable-hover" [attr.icon-left]="b.icon ? \'\' : null" [ngClass]="b.cssClass">' +
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon>' +
'{{b.text}}' +
'</button>' +
'</div>' +
'<div class="action-sheet-group" *ngIf="d.cancelButton">' +
'<button ion-button="action-sheet-button" (click)="click(d.cancelButton)" class="action-sheet-cancel disable-hover" [ngClass]="d.cancelButton.cssClass">' +
'<button ion-button="action-sheet-button" (click)="click(d.cancelButton)" class="action-sheet-cancel disable-hover" [attr.icon-left]="d.cancelButton.icon ? \'\' : null" [ngClass]="d.cancelButton.cssClass">' +
'<ion-icon [name]="d.cancelButton.icon" *ngIf="d.cancelButton.icon" class="action-sheet-icon"></ion-icon>' +
'{{d.cancelButton.text}}' +
'</button>' +
Expand Down
6 changes: 3 additions & 3 deletions src/components/action-sheet/test/basic/app-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ export class E2EPage {
{
text: 'Delete',
role: 'destructive',
icon: !this.platform.is('ios') ? 'trash' : null,
icon: 'trash',
handler: () => {
console.log('Delete clicked');
this.result = 'Deleted';
}
},
{
text: 'Share',
icon: !this.platform.is('ios') ? 'share' : null,
icon: 'share',
handler: () => {
console.log('Share clicked');
this.result = 'Shared';
}
},
{
text: 'Play',
icon: !this.platform.is('ios') ? 'arrow-dropright-circle' : null,
icon: 'arrow-dropright-circle',
handler: () => {
let modal = this.modalCtrl.create(ModalPage);
modal.present();
Expand Down

0 comments on commit a731528

Please sign in to comment.