Skip to content

Commit

Permalink
fix(tabs): make MD tab highlight the contrast color of tabs color
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Dec 6, 2016
1 parent dc0659f commit bb3a57f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/tabs/tabs.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ $tabs-md-tab-icon-size: 2.4rem !default;
color: $color-contrast;
}

.tabs-md-#{$color-name} .tab-highlight {
.tabs-md-#{$color-name}[tabsHighlight=true] .tab-highlight {
background: $color-contrast;
}

Expand Down
9 changes: 7 additions & 2 deletions src/components/tabs/test/basic/app-module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule, App, AlertController, ModalController, ViewController, Tab, Tabs } from '../../../..';
import { Config, IonicApp, IonicModule, App, AlertController, ModalController, ViewController, Tab, Tabs } from '../../../..';

//
// Modal
Expand Down Expand Up @@ -233,7 +233,7 @@ export class Tab3 {
</ion-content>
</ion-menu>
<ion-tabs #content (ionChange)="onChange($event)">
<ion-tabs #content (ionChange)="onChange($event)" [color]="myColor">
<ion-tab tabTitle="Plain List" tabIcon="star" [root]="root1" (ionSelect)="onSelect($event)"></ion-tab>
<ion-tab tabTitle="Schedule" tabIcon="globe" [root]="root2"></ion-tab>
<ion-tab tabTitle="Stopwatch" tabIcon="logo-facebook" [root]="root3"></ion-tab>
Expand All @@ -246,6 +246,11 @@ export class TabsPage {
root1 = Tab1;
root2 = Tab2;
root3 = Tab3;
myColor: string;

constructor(config: Config) {
this.myColor = (config.get('mode') !== 'ios') ? 'primary' : null;
}

onChange(ev: Tab) {
console.log('Changed tab', ev);
Expand Down

0 comments on commit bb3a57f

Please sign in to comment.