Skip to content

Commit 77f445c

Browse files
authored
Merge pull request #377 from jamiees2/master
Fix v2 dark theme
2 parents f687abd + 00ea60d commit 77f445c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Time/TimePickerModal.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,14 @@ export function TimePickerModal({
131131
[setFocused, setLocalHours, setLocalMinutes]
132132
)
133133

134-
const v3Color = theme.dark
135-
? theme.colors.elevation.level3
136-
: theme.colors.surface
137-
const v2Color = theme.dark
138-
? overlay(10, theme.colors.surface)
139-
: theme.colors.surface
134+
let color
135+
if (theme.isV3) {
136+
color = theme.dark ? theme.colors.elevation.level3 : theme.colors.surface
137+
} else {
138+
color = theme.dark
139+
? overlay(10, theme.colors.surface)
140+
: theme.colors.surface
141+
}
140142

141143
return (
142144
<Modal
@@ -171,7 +173,7 @@ export function TimePickerModal({
171173
styles.modalContent,
172174
// eslint-disable-next-line react-native/no-inline-styles
173175
{
174-
backgroundColor: theme.isV3 ? v3Color : v2Color,
176+
backgroundColor: color,
175177
borderRadius: theme.isV3 ? 28 : undefined,
176178
},
177179
]}

0 commit comments

Comments
 (0)