@exponent/react-native-action-sheet
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -6,3 +6,2 @@ 'use strict'; | ||
BackAndroid, | ||
Dimensions, | ||
Easing, | ||
@@ -18,5 +17,5 @@ PixelRatio, | ||
const DEVICE_HEIGHT = Dimensions.get('window').height; | ||
const OPACITY_ANIMATION_TIME = 250; | ||
const Y_ANIMATION_TIME = 250; | ||
const OFFSCREEN_HEIGHT = 9999; | ||
const PIXEL = 1 / PixelRatio.get(); | ||
@@ -89,4 +88,5 @@ | ||
onSelect: null, | ||
sheetHeight: OFFSCREEN_HEIGHT, | ||
overlayOpacity: new Animated.Value(0), | ||
sheetY: new Animated.Value(DEVICE_HEIGHT), | ||
sheetY: new Animated.Value(-OFFSCREEN_HEIGHT), | ||
isWaitingForSheetHeight: false, | ||
@@ -122,3 +122,3 @@ }; | ||
<Animated.View style={[styles.sheetContainer, { | ||
top: this.state.sheetY, | ||
bottom: this.state.sheetY, | ||
}]}> | ||
@@ -159,3 +159,3 @@ <View onLayout={this._onLayout} style={styles.sheet}> | ||
this.state.overlayOpacity.setValue(0); | ||
this.state.sheetY.setValue(DEVICE_HEIGHT); | ||
this.state.sheetY.setValue(-this.state.sheetHeight); | ||
@@ -208,3 +208,3 @@ Animated.timing(this.state.overlayOpacity, { | ||
Animated.timing(this.state.sheetY, { | ||
toValue: DEVICE_HEIGHT, | ||
toValue: -this.state.sheetHeight, | ||
easing: Easing.inOut(Easing.ease), | ||
@@ -225,7 +225,8 @@ duration: Y_ANIMATION_TIME, | ||
isWaitingForSheetHeight: false, | ||
sheetHeight: height, | ||
}); | ||
this.state.sheetY.setValue(DEVICE_HEIGHT); | ||
this.state.sheetY.setValue(-height); | ||
Animated.timing(this.state.sheetY, { | ||
toValue: DEVICE_HEIGHT - height, | ||
toValue: 0, | ||
easing: Easing.inOut(Easing.ease), | ||
@@ -232,0 +233,0 @@ duration: Y_ANIMATION_TIME, |
{ | ||
"name": "@exponent/react-native-action-sheet", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A cross-platform ActionSheet for React Native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,8 +46,2 @@ # react-native-action-sheet [](http://slack.exponentjs.com) | ||
getChildContext() { | ||
return { | ||
actionSheet: () => this._actionSheetRef, | ||
}; | ||
} | ||
_onOpenActionSheet() { | ||
@@ -54,0 +48,0 @@ // Same interface as https://facebook.github.io/react-native/docs/actionsheetios.html |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
262
0
10586
62