Skip to content

Commit

Permalink
Added Platform.Select to different devices and web COLORS
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyDiego committed Aug 29, 2023
1 parent 45206d9 commit ebcb53e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Date/DatePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import DatePickerModalContent, {
DatePickerModalContentSingleProps,
} from './DatePickerModalContent'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { useHeaderBackgroundColor } from '../utils'

interface DatePickerModalProps {
visible: boolean
Expand Down Expand Up @@ -66,6 +67,7 @@ export function DatePickerModal(
})

const isTransparent = presentationStyle === 'pageSheet' ? false : true
const headerBackgroundColor = useHeaderBackgroundColor()
const insets = useSafeAreaInsets()

return (
Expand Down Expand Up @@ -110,7 +112,11 @@ export function DatePickerModal(
android: StatusBar.currentHeight,
web: insets.top,
}),
backgroundColor: theme.colors.primary,
backgroundColor: Platform.select({
ios: theme.colors.primary,
android: theme.colors.primary,
web: headerBackgroundColor,
}),
},
]}
/>
Expand Down

0 comments on commit ebcb53e

Please sign in to comment.