Skip to content

Commit a114ad1

Browse files
committed
colors
1 parent ebaad1f commit a114ad1

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

Diff for: mobile/ReactNativeTutorial/.eslintrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
react-native/no-unused-styles: 2
3838
react-native/split-platform-components: 2
3939
react-native/no-inline-styles: 2
40+
react-native/no-color-literals: 2
4041

4142
react/jsx-filename-extension:
4243
- 1

Diff for: mobile/ReactNativeTutorial/app/bundles/comments/components/Add/AddStyle.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { StyleSheet } from 'react-native';
2+
import * as colors from 'ReactNativeTutorial/app/styles/colors';
23

34
const styles = StyleSheet.create({
45
button: {
5-
backgroundColor: '#4641B5',
6+
backgroundColor: colors.ACTION_BUTTON,
67
marginTop: 20,
78
},
89
});

Diff for: mobile/ReactNativeTutorial/app/bundles/comments/components/Index/Footer/FooterStyle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { StyleSheet } from 'react-native';
2+
import * as colors from 'ReactNativeTutorial/app/styles/colors';
23

34
const styles = StyleSheet.create({
45
container: {
56
height: 70,
6-
backgroundColor: '#EFEFF2',
7+
backgroundColor: colors.TABBAR_BACKGROUND,
78
alignItems: 'center',
89
justifyContent: 'center',
910
borderTopWidth: 1,
10-
borderTopColor: '#D2D2D2',
11+
borderTopColor: colors.BORDER,
1112
},
1213
});
1314

Diff for: mobile/ReactNativeTutorial/app/bundles/comments/components/Index/List/Item/ItemStyle.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { StyleSheet } from 'react-native';
2+
import * as colors from 'ReactNativeTutorial/app/styles/colors';
23

34
const styles = StyleSheet.create({
45
container: {
56
minHeight: 80,
67
marginVertical: 10,
78
marginHorizontal: 20,
8-
backgroundColor: '#F0F0F0',
9-
shadowColor: '#000000',
9+
backgroundColor: colors.ITEM_BACKGROUND,
10+
shadowColor: colors.SHADOW,
1011
shadowRadius: 11,
1112
shadowOpacity: 0.25,
1213
shadowOffset: {
@@ -23,7 +24,7 @@ const styles = StyleSheet.create({
2324
body: {
2425
marginHorizontal: 10,
2526
marginBottom: 10,
26-
color: '#555555',
27+
color: colors.BODY_TEXT,
2728
},
2829
});
2930

Diff for: mobile/ReactNativeTutorial/app/setup/Router/RouterStyle.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { StyleSheet } from 'react-native';
2+
import * as colors from 'ReactNativeTutorial/app/styles/colors';
23

34
const styles = StyleSheet.create({
45
container: {
5-
backgroundColor: '#F7F7F7',
6+
backgroundColor: colors.BACKGROUND,
67
paddingTop: 66,
78
},
89
});

Diff for: mobile/ReactNativeTutorial/app/styles/colors.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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';

0 commit comments

Comments
 (0)