File tree 6 files changed +20
-7
lines changed
mobile/ReactNativeTutorial
6 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 37
37
react-native/no-unused-styles : 2
38
38
react-native/split-platform-components : 2
39
39
react-native/no-inline-styles : 2
40
+ react-native/no-color-literals : 2
40
41
41
42
react/jsx-filename-extension :
42
43
- 1
Original file line number Diff line number Diff line change 1
1
import { StyleSheet } from 'react-native' ;
2
+ import * as colors from 'ReactNativeTutorial/app/styles/colors' ;
2
3
3
4
const styles = StyleSheet . create ( {
4
5
button : {
5
- backgroundColor : '#4641B5' ,
6
+ backgroundColor : colors . ACTION_BUTTON ,
6
7
marginTop : 20 ,
7
8
} ,
8
9
} ) ;
Original file line number Diff line number Diff line change 1
1
import { StyleSheet } from 'react-native' ;
2
+ import * as colors from 'ReactNativeTutorial/app/styles/colors' ;
2
3
3
4
const styles = StyleSheet . create ( {
4
5
container : {
5
6
height : 70 ,
6
- backgroundColor : '#EFEFF2' ,
7
+ backgroundColor : colors . TABBAR_BACKGROUND ,
7
8
alignItems : 'center' ,
8
9
justifyContent : 'center' ,
9
10
borderTopWidth : 1 ,
10
- borderTopColor : '#D2D2D2' ,
11
+ borderTopColor : colors . BORDER ,
11
12
} ,
12
13
} ) ;
13
14
Original file line number Diff line number Diff line change 1
1
import { StyleSheet } from 'react-native' ;
2
+ import * as colors from 'ReactNativeTutorial/app/styles/colors' ;
2
3
3
4
const styles = StyleSheet . create ( {
4
5
container : {
5
6
minHeight : 80 ,
6
7
marginVertical : 10 ,
7
8
marginHorizontal : 20 ,
8
- backgroundColor : '#F0F0F0' ,
9
- shadowColor : '#000000' ,
9
+ backgroundColor : colors . ITEM_BACKGROUND ,
10
+ shadowColor : colors . SHADOW ,
10
11
shadowRadius : 11 ,
11
12
shadowOpacity : 0.25 ,
12
13
shadowOffset : {
@@ -23,7 +24,7 @@ const styles = StyleSheet.create({
23
24
body : {
24
25
marginHorizontal : 10 ,
25
26
marginBottom : 10 ,
26
- color : '#555555' ,
27
+ color : colors . BODY_TEXT ,
27
28
} ,
28
29
} ) ;
29
30
Original file line number Diff line number Diff line change 1
1
import { StyleSheet } from 'react-native' ;
2
+ import * as colors from 'ReactNativeTutorial/app/styles/colors' ;
2
3
3
4
const styles = StyleSheet . create ( {
4
5
container : {
5
- backgroundColor : '#F7F7F7' ,
6
+ backgroundColor : colors . BACKGROUND ,
6
7
paddingTop : 66 ,
7
8
} ,
8
9
} ) ;
Original file line number Diff line number Diff line change
1
+ export const SHADOW = '#000000' ;
2
+ export const BORDER = '#D2D2D2' ;
3
+ export const ITEM_BACKGROUND = '#F0F0F0' ;
4
+ export const BACKGROUND = '#F7F7F7' ;
5
+ export const TABBAR_BACKGROUND = '#EFEFF2' ;
6
+ export const HEADER_TEXT = '#000000' ;
7
+ export const BODY_TEXT = '#555555' ;
8
+ export const ACTION_BUTTON = '#4641B5' ;
You can’t perform that action at this time.
0 commit comments