Skip to content

Commit

Permalink
BottomNavigation: able to change the styles of active navigation via …
Browse files Browse the repository at this point in the history
…theme (#72)
  • Loading branch information
kennethpdev authored and xotahal committed Jan 10, 2017
1 parent 1b39688 commit e28942c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BottomNavigation/BottomNavigationAction.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function getStyles(props, context) {
const local = {};

if (props.active) {
local.container = { paddingTop: 6 };
local.icon = { color: palette.primaryColor };
local.label = { color: palette.primaryColor, fontSize: 14 };
local.container = bottomNavigationAction.containerActive;
local.icon = bottomNavigationAction.iconActive;
local.label = bottomNavigationAction.labelActive;
}

if (!props.label) {
Expand Down
10 changes: 10 additions & 0 deletions src/styles/getTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ export default function getTheme(theme, ...more) {
textAlign: 'center',
color: palette.secondaryTextColor,
},
containerActive: {
paddingTop: 6
},
iconActive: {
color: palette.primaryColor
},
labelActive: {
color: palette.primaryColor,
fontSize: 14
}
}, theme.bottomNavigationAction)),
card: StyleSheet.create(merge({
container: {
Expand Down

0 comments on commit e28942c

Please sign in to comment.