Skip to content

Commit ebcb53e

Browse files
committed
Added Platform.Select to different devices and web COLORS
1 parent 45206d9 commit ebcb53e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Date/DatePickerModal.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import DatePickerModalContent, {
1515
DatePickerModalContentSingleProps,
1616
} from './DatePickerModalContent'
1717
import { useSafeAreaInsets } from 'react-native-safe-area-context'
18+
import { useHeaderBackgroundColor } from '../utils'
1819

1920
interface DatePickerModalProps {
2021
visible: boolean
@@ -66,6 +67,7 @@ export function DatePickerModal(
6667
})
6768

6869
const isTransparent = presentationStyle === 'pageSheet' ? false : true
70+
const headerBackgroundColor = useHeaderBackgroundColor()
6971
const insets = useSafeAreaInsets()
7072

7173
return (
@@ -110,7 +112,11 @@ export function DatePickerModal(
110112
android: StatusBar.currentHeight,
111113
web: insets.top,
112114
}),
113-
backgroundColor: theme.colors.primary,
115+
backgroundColor: Platform.select({
116+
ios: theme.colors.primary,
117+
android: theme.colors.primary,
118+
web: headerBackgroundColor,
119+
}),
114120
},
115121
]}
116122
/>

0 commit comments

Comments
 (0)