react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

"Margin collapse" in SafeAreaView?

Open fo-fo opened this issue 3 years ago • 0 comments

Here's a suggestion. Currently SafeAreaView adds any margin specified by the component user to the safe area margin (assuming mode=margin here.) Sometimes it would be useful to take the maximum of the two margins instead. For example, for a toast at the top of the screen I might want to add some margin myself, but if the safe area margin is already bigger than that margin, then I would like to use that instead.

I know I can already achieve this with useSafeAreaInsets, but I'd like to avoid the caveats of the hook.

fo-fo avatar Sep 09 '22 03:09 fo-fo