Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay is not animated #8

Open
St1ggy opened this issue Jan 1, 2020 · 0 comments
Open

Overlay is not animated #8

St1ggy opened this issue Jan 1, 2020 · 0 comments

Comments

@St1ggy
Copy link

St1ggy commented Jan 1, 2020

I have diff, but I can't push and create PR

diff --git a/lib/ActionSheetCustom.js b/lib/ActionSheetCustom.js
index 531c2fb..6d35a4a 100644
--- a/lib/ActionSheetCustom.js
+++ b/lib/ActionSheetCustom.js
@@ -175,7 +175,18 @@ class ActionSheet extends Component {
         onRequestClose={this.cancel}
       >
         <View style={styles.wrapper}>
-          <Text style={styles.overlay} onPress={this.cancel} />
+          <Animated.Text
+            style={[
+              styles.overlay,
+              {
+                opacity: sheetPositionY.interpolate({
+                  outputRange: [0.4, 0],
+                  inputRange: [0, this.translateY],
+                  extrapolate: 'clamp',
+                }),
+              },
+            ]}
+            onPress={this.cancel}
+          />
           <Animated.View
             style={[
               styles.backdrop,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant