react-native-flip-component
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "react-native-flip-component", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Double-sided React component that flips 180 degrees", | ||
@@ -5,0 +5,0 @@ "author": "Phil Mok", |
@@ -10,3 +10,4 @@ # react-native-flip-component | ||
### Demo | ||
GIF coming soon... | ||
To see the code from this GIF, check out `example.js` in the repo on GitHub. | ||
![](./demo.gif) | ||
@@ -16,15 +17,16 @@ ### Props | ||
---- | ----------|-------- | ||
isFlipped | true | boolean | ||
frontView | true | Component | ||
backView | true | Component | ||
scale | false | defaults to 0.8 | ||
scaleDuration | false | defaults to 100 | ||
frontPerspective | false | defaults to 1000 | ||
backPerspective | false | defaults to 1000 | ||
rotateDuration | false | defaults to 300 | ||
containerStyles | false | defaults to { flex: 1 } | ||
frontStyles | false | defaults to null | ||
backStyles | false | defaults to null | ||
isFlipped | true | Boolean that controls if the view is flipped. | ||
frontView | true | Component for the front view. | ||
backView | true | Component for the back view. | ||
scale | false | Controls if the view zooms in or out while flipping. Defaults to 0.8 | ||
scaleDuration | false | Controls how quickly the scale changes. Defaults to 100 | ||
frontPerspective | false | Controls the perception of depth for the front component. Defaults to 1000 | ||
backPerspective | false | Controls the perception of depth for the back component. Defaults to 1000 | ||
rotateDuration | false | Controls the duration of the rotation. Defaults to 300 | ||
containerStyles | false | Styles for the flip-component's container `<View>`. Defaults to null | ||
frontStyles | false | Styles for the `<Animated.View>` that wraps the front component. Defaults to null | ||
backStyles | false | Styles for the `<Animated.View>` that wraps the back component. Defaults to null | ||
### Example | ||
```javascript | ||
@@ -48,3 +50,5 @@ import React, { Component } from 'react'; | ||
<View> | ||
<Text style={{ textAlign: 'center' }}>Front Side</Text> | ||
<Text style={{ textAlign: 'center' }}> | ||
Front Side | ||
</Text> | ||
</View> | ||
@@ -54,3 +58,5 @@ } | ||
<View> | ||
<Text style={{ textAlign: 'center' }}>Back Side</Text> | ||
<Text style={{ textAlign: 'center' }}> | ||
Back Side | ||
</Text> | ||
</View> | ||
@@ -60,3 +66,5 @@ } | ||
<Button | ||
onPress={() => this.setState({ isFlipped: !this.state.isFlipped })} | ||
onPress={() => { | ||
this.setState({ isFlipped: !this.state.isFlipped }) | ||
}} | ||
title="Flip" | ||
@@ -63,0 +71,0 @@ /> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1503979
6
225
72