Skip to content

Commit e6bc5b7

Browse files
authored
refactor: better variable name (#27)
1 parent b237714 commit e6bc5b7

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/themes/default.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ const light = {
77
primaryColor: "#000000",
88
darkColor: "#444444",
99
linkColor: "#007AFF",
10-
bgColor: "#eeeeee",
11-
bgColor0: "#f9f9f9",
12-
bgColor1: "#f5f5f5",
10+
borderColor: "#eeeeee",
11+
bgColorLight: "#f9f9f9",
12+
bgColorHeavy: "#f5f5f5",
1313
};
1414
const dark = {
1515
primaryColor: "#ffffff",
1616
darkColor: "#bbbbbb",
1717
linkColor: "#007AFF",
18-
bgColor: "#222222",
19-
bgColor0: "#070707",
20-
bgColor1: "#0b0b0b",
18+
borderColor: "#222222",
19+
bgColorLight: "#070707",
20+
bgColorHeavy: "#0b0b0b",
2121
};
2222
const headingHandler = (color: ColorValue) => {
2323
return (level: number): TextStyle => {
@@ -33,18 +33,18 @@ export const defaultTheme: Theme = {
3333
blockquote: {
3434
borderLeftWidth: 3,
3535
borderLeftColor: light.darkColor,
36-
backgroundColor: light.bgColor1,
36+
backgroundColor: light.bgColorHeavy,
3737
paddingTop: 5,
3838
paddingBottom: 5,
3939
paddingLeft: 10,
4040
paddingRight: 5,
4141
gap: 5,
4242
},
43-
borderColor: light.bgColor,
43+
borderColor: light.borderColor,
4444
break: {},
4545
codeBlock: {
46-
headerBackgroundColor: light.bgColor1,
47-
contentBackgroundColor: light.bgColor0,
46+
headerBackgroundColor: light.bgColorHeavy,
47+
contentBackgroundColor: light.bgColorLight,
4848
headerTextStyle: {
4949
fontSize: 14,
5050
},
@@ -76,7 +76,7 @@ export const defaultTheme: Theme = {
7676
},
7777
inlineCode: {
7878
fontFamily: fontFamily,
79-
backgroundColor: light.bgColor0,
79+
backgroundColor: light.bgColorLight,
8080
},
8181
link: {
8282
color: light.linkColor,
@@ -107,19 +107,19 @@ export const defaultTheme: Theme = {
107107
thematicBreak: {
108108
marginVertical: 10,
109109
height: 1,
110-
backgroundColor: light.bgColor,
110+
backgroundColor: light.borderColor,
111111
},
112112
},
113113
light: {},
114114
dark: {
115115
blockquote: {
116116
borderLeftColor: dark.darkColor,
117-
backgroundColor: dark.bgColor1,
117+
backgroundColor: dark.bgColorHeavy,
118118
},
119-
borderColor: dark.bgColor,
119+
borderColor: dark.borderColor,
120120
codeBlock: {
121-
headerBackgroundColor: dark.bgColor1,
122-
contentBackgroundColor: dark.bgColor0,
121+
headerBackgroundColor: dark.bgColorHeavy,
122+
contentBackgroundColor: dark.bgColorLight,
123123
headerTextStyle: {
124124
color: dark.primaryColor,
125125
},
@@ -135,7 +135,7 @@ export const defaultTheme: Theme = {
135135
},
136136
heading: headingHandler(dark.primaryColor),
137137
inlineCode: {
138-
backgroundColor: dark.bgColor0,
138+
backgroundColor: dark.bgColorLight,
139139
},
140140
link: {
141141
color: dark.linkColor,
@@ -150,7 +150,7 @@ export const defaultTheme: Theme = {
150150
color: dark.primaryColor,
151151
},
152152
thematicBreak: {
153-
backgroundColor: dark.bgColor,
153+
backgroundColor: dark.borderColor,
154154
},
155155
},
156156
};

0 commit comments

Comments
 (0)