-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(list): add list headers and item dividers as items
- `ion-list-header` and `ion-item-divider` now take advantage of the same content projection as the `ion-item` - they are still styled as list headers and item dividers - added docs and demos on this addition closes #5561
- Loading branch information
1 parent
4aa322d
commit 712ff81
Showing
25 changed files
with
402 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import {Component} from '@angular/core'; | ||
import {ionicBootstrap} from 'ionic-angular'; | ||
import { Component } from '@angular/core'; | ||
|
||
import { ionicBootstrap } from 'ionic-angular'; | ||
|
||
@Component({ | ||
templateUrl: 'main.html' | ||
}) | ||
class ApiDemoPage { | ||
|
||
} | ||
|
||
// Uses the list's demo but passes the demo var to change the title | ||
@Component({ | ||
templateUrl: '../list/main.html' | ||
template: '<ion-nav [root]="root"></ion-nav>' | ||
}) | ||
class ApiDemoApp { | ||
demo = "Item"; | ||
root = ApiDemoPage; | ||
} | ||
|
||
ionicBootstrap(ApiDemoApp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<ion-header> | ||
|
||
<ion-toolbar> | ||
<ion-title>Item</ion-title> | ||
</ion-toolbar> | ||
|
||
</ion-header> | ||
|
||
|
||
<ion-content class="outer-content"> | ||
|
||
<ion-list> | ||
<ion-list-header> | ||
Settings | ||
<button item-right clear> | ||
<ion-icon name="cog"></ion-icon> | ||
</button> | ||
</ion-list-header> | ||
|
||
<ion-item-group> | ||
<ion-item> | ||
<ion-icon name="plane" item-left danger></ion-icon> | ||
<ion-label>Airplane Mode</ion-label> | ||
<ion-toggle secondary></ion-toggle> | ||
</ion-item> | ||
|
||
<button ion-item> | ||
<ion-icon name="wifi" item-left primary></ion-icon> | ||
<ion-label>Wi-Fi</ion-label> | ||
<ion-note item-right>The Interwebz</ion-note> | ||
</button> | ||
|
||
<button ion-item> | ||
<ion-icon name="bluetooth" item-left primary></ion-icon> | ||
<ion-label>Bluetooth</ion-label> | ||
<ion-note item-right>Off</ion-note> | ||
</button> | ||
</ion-item-group> | ||
|
||
<ion-item-divider primary> | ||
Other Settings | ||
<button item-right outline light>Clear</button> | ||
</ion-item-divider> | ||
|
||
<button ion-item> | ||
<ion-icon name="call" item-left secondary></ion-icon> | ||
<ion-label>Cellular</ion-label> | ||
</button> | ||
|
||
<button ion-item> | ||
<ion-icon name="link" item-left secondary></ion-icon> | ||
<ion-label>Personal Hotspot</ion-label> | ||
<ion-note item-right>Off</ion-note> | ||
</button> | ||
</ion-list> | ||
|
||
<ion-list radio-group> | ||
<ion-list-header> | ||
<ion-icon item-left name="phone-portrait"></ion-icon> | ||
Silence Phone | ||
</ion-list-header> | ||
|
||
<ion-item> | ||
<ion-label dark>Always</ion-label> | ||
<ion-radio value="always" checked></ion-radio> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label dark>Only while phone is locked</ion-label> | ||
<ion-radio value="locked"></ion-radio> | ||
</ion-item> | ||
</ion-list> | ||
|
||
<ion-list> | ||
<ion-list-header> | ||
Apps Installed | ||
</ion-list-header> | ||
|
||
<ion-item> | ||
<ion-icon name="ionic" item-left primary></ion-icon> | ||
<ion-label>Ionic View</ion-label> | ||
<button outline item-right>Uninstall</button> | ||
</ion-item> | ||
<ion-item> | ||
<ion-icon name="brush" item-left primary></ion-icon> | ||
<ion-label>Ionic Creator</ion-label> | ||
<button outline item-right>Uninstall</button> | ||
</ion-item> | ||
<ion-item> | ||
<ion-icon name="logo-octocat" item-left dark></ion-icon> | ||
<ion-label>Hubstruck</ion-label> | ||
<button outline item-right>Uninstall</button> | ||
</ion-item> | ||
<ion-item> | ||
<ion-icon name="paw" item-left danger></ion-icon> | ||
<ion-label>Barkpark</ion-label> | ||
<button outline item-right>Uninstall</button> | ||
</ion-item> | ||
</ion-list> | ||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import {Component} from '@angular/core'; | ||
import {ionicBootstrap} from 'ionic-angular'; | ||
import { Component } from '@angular/core'; | ||
|
||
import { ionicBootstrap } from 'ionic-angular'; | ||
|
||
@Component({ | ||
templateUrl: 'main.html' | ||
}) | ||
class ApiDemoPage { | ||
|
||
} | ||
|
||
@Component({ | ||
template: '<ion-nav [root]="root"></ion-nav>' | ||
}) | ||
class ApiDemoApp { | ||
demo = "List"; | ||
root = ApiDemoPage; | ||
} | ||
|
||
ionicBootstrap(ApiDemoApp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.