SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

Add safeAreaInsets prop to configure the SafeAreaView wrapper #61

Closed Rohansi closed 4 years ago

Rohansi commented 4 years ago

This lets us fix shifting that can occur when using popovers from a view that renders into the safe area insets. In my app I added safeAreaInsets={{ horizontal: 'never', vertical: 'never' }} to my Popover and no longer get any shifting. The documentation for SafeAreaView's forceInset explains why this happens (and that it was made to fix this!).

I've also updated the TypeScript definitions for this prop and the translucent one added before. Let me know if any other type definitions need updating.

Rohansi commented 4 years ago

Fixes #60 (the shifting)

SteffeyDev commented 4 years ago

This is awesome! thanks for updating the TypeScript defs, I always forget about those.