Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
add code for panning animation
- disable scroll while panning - remove animated header because its getting in the way
- Loading branch information
1 parent
b5418e2
commit b0d9ccb
Showing
5 changed files
with
251 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Original file line | Diff line number | Diff line change |
|---|---|---|---|
| @@ -0,0 +1,37 @@ | |||
| import React, { Component } from "react"; | |||
| import { View, Text, Dimensions } from "react-native"; | |||
|
|
|||
| const { height, width } = Dimensions.get("window"); | |||
|
|
|||
| const DropArea = ({ dropAreaIsVisible, setDropAreaLayout, isTargeted }) => { | |||
| const right = dropAreaIsVisible ? 20 : -200; | |||
| const color = isTargeted ? "#5fba7d" : "#333"; | |||
| return ( | |||
| <View | |||
| style={[styles.dropArea, { right }, { borderColor: color }]} | |||
| onLayout={setDropAreaLayout} | |||
| > | |||
| <Text style={[styles.dropAreaText, { color }]}>Drop here</Text> | |||
| </View> | |||
| ); | |||
| }; | |||
|
|
|||
| const styles = { | |||
| dropArea: { | |||
| position: "absolute", | |||
| top: 20, | |||
| right: 20, | |||
| width: 100, | |||
| height: 100, | |||
| backgroundColor: "#eaeaea", | |||
| borderWidth: 3, | |||
| borderStyle: "dashed", | |||
| alignItems: "center", | |||
| justifyContent: "center" | |||
| }, | |||
| dropAreaText: { | |||
| fontSize: 15 | |||
| } | |||
| }; | |||
|
|
|||
| export default DropArea; | |||
Oops, something went wrong.