fix(segment-button): make layout default to icon-top (#16573)

- updates segment button so that when layout is not provided the following will happen
  - if both label and icon are there, it will apply icon-top
  - if only label or only icon, it will style as such
This commit is contained in:
Brandy Carney
2018-12-03 16:57:12 -05:00
committed by GitHub
parent 2ce986f39f
commit 841375e5c8
6 changed files with 47 additions and 28 deletions

View File

@ -64,15 +64,15 @@
<!-- Icon top -->
<ion-segment>
<ion-segment-button layout="icon-top">
<ion-segment-button>
<ion-label>Item One</ion-label>
<ion-icon name="call"></ion-icon>
</ion-segment-button>
<ion-segment-button checked layout="icon-top">
<ion-segment-button checked>
<ion-label>Item Two</ion-label>
<ion-icon name="heart"></ion-icon>
</ion-segment-button>
<ion-segment-button layout="icon-top">
<ion-segment-button>
<ion-label>Item Three</ion-label>
<ion-icon name="pin"></ion-icon>
</ion-segment-button>