chore: update readme and bump version

This commit is contained in:
Brent Vatne
2019-08-23 17:04:34 -07:00
parent 5df122d9fc
commit 23c6f6cd4b
2 changed files with 18 additions and 1 deletions

View File

@@ -44,4 +44,21 @@ const MySwitch = createAnimatedSwitchNavigator(
);
```
If you need to customize the underlying `Transitioning.View` style, you can pass in a `transitionViewStyle` option.
```js
import createAnimatedSwitchNavigator from 'react-navigation-animated-switch';
import { Transition } from 'react-native-reanimated';
const MySwitch = createAnimatedSwitchNavigator(
{
Home: HomeScreen,
Other: OtherScreen,
},
{
transitionViewStyle: { backgroundColor: 'red' },
}
);
```
[Learn more about the `Transition` API here](https://github.com/kmagiera/react-native-reanimated).

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation-animated-switch",
"version": "0.2.1",
"version": "0.3.1",
"description": "Animated switch for React Navigation",
"main": "lib/commonjs/index.js",
"react-native": "lib/module/index.js",