Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Date Picker Modal Overlapping StatusBar in iOS #352

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Date/DatePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
useWindowDimensions,
View,
Platform,
NativeModules,
StatusBar,
} from 'react-native'
import { useTheme } from 'react-native-paper'
Expand Down Expand Up @@ -69,6 +70,7 @@
const isTransparent = presentationStyle === 'pageSheet' ? false : true
const headerBackgroundColor = useHeaderBackgroundColor()
const insets = useSafeAreaInsets()
const {StatusBarManager} = NativeModules;

Check failure on line 73 in src/Date/DatePickerModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `StatusBarManager}·=·NativeModules;` with `·StatusBarManager·}·=·NativeModules`

return (
<View style={[StyleSheet.absoluteFill]} pointerEvents="box-none">
Expand Down Expand Up @@ -108,7 +110,7 @@
style={[
{
height: Platform.select({
ios: StatusBar.currentHeight,
ios: StatusBarManager.HEIGHT ,

Check failure on line 113 in src/Date/DatePickerModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
android: StatusBar.currentHeight,
web: insets.top,
}),
Expand Down
Loading