mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(action-sheet): add icon-left to the button if an icon exists
This commit is contained in:
@ -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>' +
|
||||
|
@ -18,7 +18,7 @@ export class E2EPage {
|
||||
{
|
||||
text: 'Delete',
|
||||
role: 'destructive',
|
||||
icon: !this.platform.is('ios') ? 'trash' : null,
|
||||
icon: 'trash',
|
||||
handler: () => {
|
||||
console.log('Delete clicked');
|
||||
this.result = 'Deleted';
|
||||
@ -26,7 +26,7 @@ export class E2EPage {
|
||||
},
|
||||
{
|
||||
text: 'Share',
|
||||
icon: !this.platform.is('ios') ? 'share' : null,
|
||||
icon: 'share',
|
||||
handler: () => {
|
||||
console.log('Share clicked');
|
||||
this.result = 'Shared';
|
||||
@ -34,7 +34,7 @@ export class E2EPage {
|
||||
},
|
||||
{
|
||||
text: 'Play',
|
||||
icon: !this.platform.is('ios') ? 'arrow-dropright-circle' : null,
|
||||
icon: 'arrow-dropright-circle',
|
||||
handler: () => {
|
||||
let modal = this.modalCtrl.create(ModalPage);
|
||||
modal.present();
|
||||
|
Reference in New Issue
Block a user