refactor(sass): add Sass variables for action sheet and rename some

also remove unused properties

references #5651
This commit is contained in:
Brandy Carney
2016-03-02 12:26:10 -05:00
parent 2ed20411c8
commit 50b7d7052d
4 changed files with 100 additions and 101 deletions

View File

@@ -1,4 +1,4 @@
import {App, Page, ActionSheet, Modal, NavController, ViewController} from 'ionic-angular';
import {App, Page, ActionSheet, Modal, NavController, ViewController, Platform} from 'ionic-angular';
@Page({
@@ -7,31 +7,34 @@ import {App, Page, ActionSheet, Modal, NavController, ViewController} from 'ioni
class E2EPage {
result: string = '';
constructor(private nav: NavController) {}
constructor(private nav: NavController, private platform: Platform) {}
presentActionSheet1() {
this.result = '';
let actionSheet = ActionSheet.create({
title: 'Modify your album',
title: 'Albums',
buttons: [
{
text: 'Destructive',
text: 'Delete',
role: 'destructive',
icon: this.platform.is('android') ? 'trash' : null,
handler: () => {
console.log('Destructive clicked');
this.result = 'Destructive';
console.log('Delete clicked');
this.result = 'Deleted';
}
},
{
text: 'Archive',
text: 'Share',
icon: this.platform.is('android') ? 'share' : null,
handler: () => {
console.log('Archive clicked');
this.result = 'Archived';
console.log('Share clicked');
this.result = 'Shared';
}
},
{
text: 'Open Modal',
text: 'Play',
icon: this.platform.is('android') ? 'arrow-dropright-circle' : null,
handler: () => {
let modal = Modal.create(ModalPage);
this.nav.present(modal);
@@ -40,9 +43,18 @@ class E2EPage {
return false;
}
},
{
text: 'Favorite',
icon: this.platform.is('android') ? 'heart' : null,
handler: () => {
console.log('Favorite clicked');
this.result = 'Favorited';
}
},
{
text: 'Cancel',
role: 'cancel', // will always sort to be on the bottom
icon: this.platform.is('android') ? 'close' : null,
handler: () => {
console.log('Cancel clicked');
this.result = 'Canceled';
@@ -94,7 +106,7 @@ class E2EPage {
@Page({
template: `
<ion-toolbar>
<ion-buttons>
<ion-buttons start>
<button (click)="dismiss()">Close</button>
</ion-buttons>
<ion-title>Modal</ion-title>