react-native-modal
Advanced tools
Comparing version 5.1.0-0 to 5.1.0
{ | ||
"name": "react-native-modal", | ||
"version": "5.1.0-0", | ||
"version": "5.1.0", | ||
"description": "An enhanced React-Native modal", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -117,24 +117,25 @@ # react-native-modal | ||
| Name | Type | Default | Description | | ||
| --------------------------- | ---------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | ||
| animationIn | string or object | 'slideInUp' | Modal show animation | | ||
| animationInTiming | number | 300 | Timing for the modal show animation (in ms) | | ||
| animationOut | string or object | 'slideOutDown' | Modal hide animation | | ||
| animationOutTiming | number | 300 | Timing for the modal hide animation (in ms) | | ||
| avoidKeyboard | bool | false | Move the modal up if the keyboard is open | | ||
| backdropColor | string | 'black' | The backdrop background color | | ||
| backdropOpacity | number | 0.70 | The backdrop opacity when the modal is visible | | ||
| backdropTransitionInTiming | number | 300 | The backdrop show timing (in ms) | | ||
| backdropTransitionOutTiming | number | 300 | The backdrop hide timing (in ms) | | ||
| children | node | **REQUIRED** | The modal content | | ||
| isVisible | bool | **REQUIRED** | Show the modal? | | ||
| onBackButtonPress | func | () => null | Called when the Android back button is pressed | | ||
| onBackdropPress | func | () => null | Called when the backdrop is pressed | | ||
| onModalHide | func | () => null | Called when the modal is completely hidden | | ||
| onModalShow | func | () => null | Called when the modal is completely visible | | ||
| onSwipe | func | null | Called when the `swipeThreshold` has been reached | e | | ||
| swipeThreshold | number | 100 | Swiping threshold that when reached calls `onSwipe` | | ||
| swipeDirection | string | null | Defines the direction where the modal can be swiped (can be 'up', 'down', 'left, or 'right') | | ||
| useNativeDriver | bool | false | Defines if animations should use [native driver](https://facebook.github.io/react-native/docs/animated.html#using-the-native-driver) | | ||
| style | any | null | Style applied to the modal | | ||
| Name | Type | Default | Description | | ||
| ------------------------------ | ---------------- | -------------- | -------------------------------------------------------------------------------------------- | | ||
| animationIn | string or object | 'slideInUp' | Modal show animation | | ||
| animationInTiming | number | 300 | Timing for the modal show animation (in ms) | | ||
| animationOut | string or object | 'slideOutDown' | Modal hide animation | | ||
| animationOutTiming | number | 300 | Timing for the modal hide animation (in ms) | | ||
| avoidKeyboard | bool | false | Move the modal up if the keyboard is open | | ||
| backdropColor | string | 'black' | The backdrop background color | | ||
| backdropOpacity | number | 0.70 | The backdrop opacity when the modal is visible | | ||
| backdropTransitionInTiming | number | 300 | The backdrop show timing (in ms) | | ||
| backdropTransitionOutTiming | number | 300 | The backdrop hide timing (in ms) | | ||
| children | node | **REQUIRED** | The modal content | | ||
| isVisible | bool | **REQUIRED** | Show the modal? | | ||
| onBackButtonPress | func | () => null | Called when the Android back button is pressed | | ||
| onBackdropPress | func | () => null | Called when the backdrop is pressed | | ||
| onModalHide | func | () => null | Called when the modal is completely hidden | | ||
| onModalShow | func | () => null | Called when the modal is completely visible | | ||
| onSwipe | func | null | Called when the `swipeThreshold` has been reached | | ||
| swipeThreshold | number | 100 | Swiping threshold that when reached calls `onSwipe` | | ||
| swipeDirection | string | null | Defines the direction where the modal can be swiped (can be 'up', 'down', 'left, or 'right') | | ||
| useNativeDriver | bool | false | Defines if animations should use native driver | | ||
| hideModalContentWhileAnimating | bool | false | Enhances the performance by hiding the modal content until the animations complete | | ||
| style | any | null | Style applied to the modal | | ||
@@ -179,5 +180,10 @@ ## Frequently Asked Questions | ||
### The modal flashes in a weird way when animating | ||
Unfortunately this is a [know issue](https://github.com/react-native-community/react-native-modal/issues/92) that happens when `useNativeDriver=true` and must still be solved. | ||
In the meanwhile as a workaround you can set the `hideModalContentWhileAnimating` prop to `true`: this seems to solve the issue. | ||
### The modal doesn't change orientation | ||
Add a `supportedOrientations={['portrait', 'landscape']}` prop to the component, as described [in the React Native documentation](https://facebook.github.io/react-native/docs/modal.html#supportedorientations) | ||
Add a `supportedOrientations={['portrait', 'landscape']}` prop to the component, as described [in the React Native documentation](https://facebook.github.io/react-native/docs/modal.html#supportedorientations). | ||
@@ -184,0 +190,0 @@ ## Available animations |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
195
28313