mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
refactor(toolbar): added the ability to add a search bar or segment in toolbar
Removed ion-segments dependency on being in the ion-title as this should be for text only. References #356
This commit is contained in:
@ -7,6 +7,7 @@ $segment-button-padding: 0 16px !default;
|
||||
|
||||
ion-segment {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ion-segment {
|
||||
|
@ -1,5 +1,4 @@
|
||||
<ion-toolbar>
|
||||
<ion-title>
|
||||
<ion-segment [(ng-model)]="relationship">
|
||||
<ion-segment-button value="friends" class="e2eSegmentFriends">
|
||||
Friends
|
||||
@ -8,7 +7,6 @@
|
||||
Enemies
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-toolbar>
|
||||
@ -17,7 +15,6 @@
|
||||
<icon search></icon>
|
||||
</button>
|
||||
</ion-nav-items>
|
||||
<ion-title>
|
||||
<ion-segment secondary>
|
||||
<ion-segment-button>
|
||||
Something
|
||||
@ -26,7 +23,6 @@
|
||||
Else
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding>
|
||||
@ -87,7 +83,6 @@
|
||||
</ion-content>
|
||||
|
||||
<ion-toolbar position="bottom">
|
||||
<ion-title>
|
||||
<ion-segment [(ng-model)]="appType" primary>
|
||||
<ion-segment-button value="paid">
|
||||
Paid
|
||||
@ -99,5 +94,4 @@
|
||||
Top Grossing
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
|
@ -60,7 +60,7 @@ export class ToolbarBase extends Ion {
|
||||
template:
|
||||
'<div class="toolbar-inner">' +
|
||||
'<ng-content select="[menu-toggle]"></ng-content>' +
|
||||
'<ng-content select="ion-title"></ng-content>' +
|
||||
'<ng-content select="ion-title,ion-search-bar,ion-segment"></ng-content>' +
|
||||
'<ng-content select="ion-nav-items[primary]"></ng-content>' +
|
||||
'<ng-content select="ion-nav-items[secondary]"></ng-content>' +
|
||||
'</div>' +
|
||||
|
Reference in New Issue
Block a user