Skip to content

Commit 97429df

Browse files
committed
fix up the background color of Section on Android
1 parent 6002602 commit 97429df

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

modules/tableview/index.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
// @flow
22

3+
import * as React from 'react'
4+
import {Platform} from 'react-native'
5+
import {androidLightBackground} from '@frogpond/colors'
6+
7+
import {TableView, Section as IosSection, Cell} from 'react-native-tableview-simple'
8+
39
export * from './cells'
4-
export {TableView, Section, Cell} from 'react-native-tableview-simple'
10+
11+
let AndroidSection = (props) => <IosSection sectionTintColor={androidLightBackground} {...props} />
12+
let Section
13+
14+
if (Platform.OS === 'android') {
15+
Section = AndroidSection
16+
} else {
17+
Section = IosSection
18+
}
19+
20+
export {TableView, Section, Cell}

0 commit comments

Comments
 (0)