miyabi / react-native-safe-area

React Native module to retrieve safe area insets for iOS 11 or later.
MIT License
113 stars 23 forks source link

Added directions verticalLeft, verticalRight, horizontalTop and horizontalBottom #5

Closed baspellis closed 6 years ago

baspellis commented 6 years ago

To allow to omit only a single direction I've added verticalLeft, verticalRight, horizontalTop and horizontalBottom. This way you can ignore only Top, Left, Bottom or Right safe area margin.

miyabi commented 6 years ago

@baspellis Thank you for PR! You are right, these direction options are necessary . But I think they should be like 'verticalAndLeft'. Could you change?

baspellis commented 6 years ago

To make it consistent with 'topLeft', 'topRight', 'bottomLeft' and 'bottomRight' I think it should not be changed. Or would you also want to change this to 'topAndLeft', 'topAndRight', 'bottomAndLeft' and 'bottomAndRight'? You decide.

miyabi commented 6 years ago

Oh, you are right... For compatibility 'topLeft', 'topRight', 'bottomLeft' and 'bottomRight' should not be changed, so I will add 'topAndLeft', 'topAndRight', 'bottomAndLeft' and 'bottomAndRight' after merging your PR. Thank you.

baspellis commented 6 years ago

Renamed as requested.