Skip to content

Commit ae06aa2

Browse files
committed
remove inline style from tab bar icon
1 parent f741626 commit ae06aa2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
// @flow
2-
// eslint-disable react-native/no-inline-styles
32
import React from 'react'
3+
import {StyleSheet} from 'react-native'
44
import Icon from 'react-native-vector-icons/Ionicons'
55

6+
const styles = StyleSheet.create({
7+
icon: {
8+
fontSize: 30,
9+
},
10+
})
11+
612
export const TabBarIcon = (icon: string) => ({
713
tintColor,
814
focused,
@@ -11,6 +17,6 @@ export const TabBarIcon = (icon: string) => ({
1117
focused: boolean,
1218
}) =>
1319
<Icon
14-
style={[{color: tintColor, fontSize: 30}]}
20+
style={[styles.icon, {color: tintColor}]}
1521
name={focused ? `ios-${icon}` : `ios-${icon}-outline`}
1622
/>

0 commit comments

Comments
 (0)