Skip to content

Commit 6b9fcdc

Browse files
authored
Merge pull request #1205 from StoDevX/backgrounds
Fix background colors differing in react-navigation vs us
2 parents be375c5 + 26014b7 commit 6b9fcdc

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

source/navigation.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @flow
22

3+
import {Platform, StyleSheet} from 'react-native'
34
import {StackNavigator} from 'react-navigation'
45
import * as c from './views/components/colors'
56

@@ -31,6 +32,22 @@ import {FaqView} from './views/faqs'
3132
// import {SnapshotsView} from './storybook'
3233
import HelpView from './views/help'
3334

35+
const styles = StyleSheet.create({
36+
header: {
37+
backgroundColor: c.olevilleGold,
38+
},
39+
card: {
40+
...Platform.select({
41+
ios: {
42+
backgroundColor: c.iosLightBackground,
43+
},
44+
android: {
45+
backgroundColor: c.androidLightBackground,
46+
},
47+
}),
48+
},
49+
})
50+
3451
export const AppNavigator = StackNavigator(
3552
{
3653
HomeView: {screen: HomeView},
@@ -66,10 +83,9 @@ export const AppNavigator = StackNavigator(
6683
},
6784
{
6885
navigationOptions: {
69-
headerStyle: {
70-
backgroundColor: c.olevilleGold,
71-
},
86+
headerStyle: styles.header,
7287
headerTintColor: c.white,
7388
},
89+
cardStyle: styles.card,
7490
},
7591
)

0 commit comments

Comments
 (0)