mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
docs(demos) make destructive button top button
This commit is contained in:
@ -25,6 +25,14 @@ export class InitialPage {
|
|||||||
var androidSheet = {
|
var androidSheet = {
|
||||||
title: 'Albums',
|
title: 'Albums',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'Delete',
|
||||||
|
style: 'destructive',
|
||||||
|
icon: 'md-trash',
|
||||||
|
handler: () => {
|
||||||
|
console.log('Destructive clicked');
|
||||||
|
}
|
||||||
|
},
|
||||||
{ text: 'Share',
|
{ text: 'Share',
|
||||||
icon: 'share',
|
icon: 'share',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
@ -43,14 +51,6 @@ export class InitialPage {
|
|||||||
console.log('Favorite clicked');
|
console.log('Favorite clicked');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: 'Delete',
|
|
||||||
style: 'destructive',
|
|
||||||
icon: 'md-trash',
|
|
||||||
handler: () => {
|
|
||||||
console.log('Destructive clicked');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
style: 'cancel',
|
style: 'cancel',
|
||||||
@ -65,6 +65,13 @@ export class InitialPage {
|
|||||||
|
|
||||||
let actionSheet = ActionSheet.create( androidSheet || {
|
let actionSheet = ActionSheet.create( androidSheet || {
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'Delete',
|
||||||
|
style: 'destructive',
|
||||||
|
handler: () => {
|
||||||
|
console.log('Destructive clicked');
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'Share',
|
text: 'Share',
|
||||||
handler: () => {
|
handler: () => {
|
||||||
@ -83,13 +90,6 @@ export class InitialPage {
|
|||||||
console.log('Favorite clicked');
|
console.log('Favorite clicked');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: 'Delete',
|
|
||||||
style: 'destructive',
|
|
||||||
handler: () => {
|
|
||||||
console.log('Destructive clicked');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
style: 'cancel',
|
style: 'cancel',
|
||||||
|
Reference in New Issue
Block a user