mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(picker): add ability to use picker inline (#26336)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<ion-button id="open-action-sheet">Open Action Sheet</ion-button>
|
||||
<ion-button id="open-loading">Open Loading</ion-button>
|
||||
<ion-button id="open-toast">Open Toast</ion-button>
|
||||
<ion-button id="open-picker">Open Picker</ion-button>
|
||||
|
||||
<ion-alert
|
||||
trigger="open-alert"
|
||||
@@ -30,4 +31,10 @@
|
||||
message="This is a toast message"
|
||||
[buttons]="['Button']"
|
||||
></ion-toast>
|
||||
|
||||
<ion-picker
|
||||
trigger="open-picker"
|
||||
[columns]="pickerColumns"
|
||||
[buttons]="pickerButtons"
|
||||
></ion-picker>
|
||||
</ion-content>
|
||||
|
||||
@@ -7,4 +7,25 @@ import { Component } from "@angular/core";
|
||||
selector: 'app-overlays-inline',
|
||||
templateUrl: 'overlays-inline.component.html'
|
||||
})
|
||||
export class OverlaysInlineComponent {}
|
||||
export class OverlaysInlineComponent {
|
||||
public pickerButtons = [{ text: 'Ok' }, { text: 'Cancel', role: 'cancel' }];
|
||||
public pickerColumns = [
|
||||
{
|
||||
name: 'Colors',
|
||||
options: [
|
||||
{
|
||||
text: 'Red',
|
||||
value: 'red',
|
||||
},
|
||||
{
|
||||
text: 'Blue',
|
||||
value: 'blue',
|
||||
},
|
||||
{
|
||||
text: 'Green',
|
||||
value: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user