Skip to content

Commit 552343d

Browse files
committed
fix v2 dark theme
1 parent f687abd commit 552343d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/Time/TimePickerModal.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,16 @@ 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
137+
? theme.colors.elevation.level3
138+
: theme.colors.surface
139+
} else {
140+
color = theme.dark
141+
? overlay(10, theme.colors.surface)
142+
: theme.colors.surface
143+
}
140144

141145
return (
142146
<Modal
@@ -171,7 +175,7 @@ export function TimePickerModal({
171175
styles.modalContent,
172176
// eslint-disable-next-line react-native/no-inline-styles
173177
{
174-
backgroundColor: theme.isV3 ? v3Color : v2Color,
178+
backgroundColor: color,
175179
borderRadius: theme.isV3 ? 28 : undefined,
176180
},
177181
]}

0 commit comments

Comments
 (0)