Skip to content

Commit 8a87f3e

Browse files
committed
Fixup Android colors
Ref: mmazzarolo#105
1 parent 08194df commit 8a87f3e

File tree

7 files changed

+10
-40
lines changed

7 files changed

+10
-40
lines changed

src/Button.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ const buildStyles: StyleBuilder = (isDark) =>
8080
backgroundColor: "transparent",
8181
},
8282
android: {
83-
color: PlatformColor(
84-
`@android:color/${isDark ? "link_text_dark" : "link_text_dark_light"}`
85-
),
83+
color: isDark ? "#BFC7C7C7" : "#BF727272",
8684
textAlign: "center",
8785
backgroundColor: "transparent",
8886
padding: 8,

src/CodeInput.tsx

+2-10
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ const buildStyles = (isDark: boolean) =>
151151
color: PlatformColor("label"),
152152
},
153153
android: {
154-
color: PlatformColor(
155-
`@android:color/${
156-
isDark ? "primary_text_dark" : "primary_text_light"
157-
}`
158-
),
154+
color: isDark ? "#FAFAFA" : "#212121",
159155
fontSize: 20,
160156
},
161157
default: {},
@@ -165,11 +161,7 @@ const buildStyles = (isDark: boolean) =>
165161
color: PlatformColor("label"),
166162
},
167163
android: {
168-
color: PlatformColor(
169-
`@android:color/${
170-
isDark ? "primary_text_dark" : "primary_text_light"
171-
}`
172-
),
164+
color: isDark ? "#FAFAFA" : "#212121",
173165
fontSize: 14,
174166
},
175167
default: {},

src/Container.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const DialogContainer: React.FC<DialogContainerProps> = (props) => {
135135
);
136136
};
137137

138-
const buildStyles: StyleBuilder = () =>
138+
const buildStyles: StyleBuilder = (isDark: boolean) =>
139139
StyleSheet.create({
140140
centeredView: {
141141
marginTop: 22,
@@ -157,7 +157,7 @@ const buildStyles: StyleBuilder = () =>
157157
overflow: "hidden",
158158
},
159159
android: {
160-
backgroundColor: PlatformColor("?attr/colorBackgroundFloating"),
160+
backgroundColor: isDark ? "#212121" : "#FFFFFF",
161161
flexDirection: "column",
162162
borderRadius: 3,
163163
padding: 16,

src/Description.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ const buildStyles: StyleBuilder = (isDark) =>
3333
marginTop: 4,
3434
},
3535
android: {
36-
color: PlatformColor(
37-
`@android:color/${
38-
isDark ? "secondary_text_dark" : "secondary_text_light"
39-
}`
40-
),
36+
color: isDark ? "#C7C7C7" : "#727272",
4137
fontSize: 16,
4238
marginTop: 10,
4339
},

src/Input.tsx

+2-10
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ const buildStyles: StyleBuilder = (isDark) =>
8686
color: PlatformColor("label"),
8787
},
8888
android: {
89-
color: PlatformColor(
90-
`@android:color/${
91-
isDark ? "primary_text_dark" : "primary_text_light"
92-
}`
93-
),
89+
color: isDark ? "#FAFAFA" : "#212121",
9490
fontSize: 14,
9591
},
9692
default: {},
@@ -100,11 +96,7 @@ const buildStyles: StyleBuilder = (isDark) =>
10096
color: PlatformColor("label"),
10197
},
10298
android: {
103-
color: PlatformColor(
104-
`@android:color/${
105-
isDark ? "primary_text_dark" : "primary_text_light"
106-
}`
107-
),
99+
color: isDark ? "#FAFAFA" : "#212121",
108100
marginLeft: -4,
109101
paddingLeft: 4,
110102
},

src/Switch.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ const buildStyles: StyleBuilder = (isDark) =>
5959
flex: 1,
6060
paddingRight: 8,
6161
fontSize: 16,
62-
color: PlatformColor(
63-
`@android:color/${
64-
isDark ? "primary_text_dark" : "primary_text_light"
65-
}`
66-
),
62+
color: isDark ? "#FAFAFA" : "#212121",
6763
},
6864
default: {},
6965
}),

src/Title.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ const buildStyles: StyleBuilder = (isDark) =>
3333
fontWeight: "600",
3434
},
3535
android: {
36-
color: PlatformColor(
37-
`@android:color/${
38-
isDark ? "primary_text_dark" : "primary_text_light"
39-
}`
40-
),
36+
color: isDark ? "#FAFAFA" : "#212121",
4137
fontWeight: "500",
4238
fontSize: 18,
4339
},

0 commit comments

Comments
 (0)