@expo/react-native-action-sheet
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -19,2 +19,3 @@ // @flow | ||
View, | ||
ScrollView, | ||
} from 'react-native'; | ||
@@ -108,5 +109,3 @@ | ||
{iconElement} | ||
<Text style={[styles.text, { color }, textStyle]}> | ||
{options[i]} | ||
</Text> | ||
<Text style={[styles.text, { color }, textStyle]}>{options[i]}</Text> | ||
</TouchableNativeFeedbackSafe> | ||
@@ -116,5 +115,3 @@ ); | ||
if (i < startIndex + length - 1) { | ||
optionViews.push( | ||
<View key={`separator-${i}`} style={styles.rowSeparator} /> | ||
); | ||
optionViews.push(<View key={`separator-${i}`} style={styles.rowSeparator} />); | ||
} | ||
@@ -125,3 +122,3 @@ } | ||
<View style={styles.groupContainer}> | ||
{optionViews} | ||
<ScrollView>{optionViews}</ScrollView> | ||
</View> | ||
@@ -148,12 +145,12 @@ ); | ||
let { isVisible } = this.state; | ||
let overlay = isVisible | ||
? <Animated.View | ||
style={[ | ||
styles.overlay, | ||
{ | ||
opacity: this.state.overlayOpacity, | ||
}, | ||
]} | ||
/> | ||
: null; | ||
let overlay = isVisible ? ( | ||
<Animated.View | ||
style={[ | ||
styles.overlay, | ||
{ | ||
opacity: this.state.overlayOpacity, | ||
}, | ||
]} | ||
/> | ||
) : null; | ||
@@ -331,5 +328,3 @@ let sheet = isVisible ? this._renderSheet() : null; | ||
TouchableComponent = Platform.Version <= 20 | ||
? TouchableOpacity | ||
: TouchableNativeFeedback; | ||
TouchableComponent = Platform.Version <= 20 ? TouchableOpacity : TouchableNativeFeedback; | ||
@@ -351,13 +346,7 @@ if (TouchableComponent !== TouchableNativeFeedback) { | ||
<TouchableComponent {...this.props} style={{}}> | ||
<View style={this.props.style}> | ||
{this.props.children} | ||
</View> | ||
<View style={this.props.style}>{this.props.children}</View> | ||
</TouchableComponent> | ||
); | ||
} else { | ||
return ( | ||
<TouchableComponent {...this.props}> | ||
{this.props.children} | ||
</TouchableComponent> | ||
); | ||
return <TouchableComponent {...this.props}>{this.props.children}</TouchableComponent>; | ||
} | ||
@@ -364,0 +353,0 @@ } |
@@ -8,7 +8,3 @@ 'use strict'; | ||
render() { | ||
return ( | ||
<View style={{ flex: 1 }}> | ||
{React.Children.only(this.props.children)} | ||
</View> | ||
); | ||
return <View style={{ flex: 1 }}>{React.Children.only(this.props.children)}</View>; | ||
} | ||
@@ -15,0 +11,0 @@ |
@@ -23,3 +23,3 @@ import React from 'react'; | ||
return ( | ||
<ActionSheet ref={component => this._actionSheetRef = component}> | ||
<ActionSheet ref={component => (this._actionSheetRef = component)}> | ||
{React.Children.only(this.props.children)} | ||
@@ -26,0 +26,0 @@ </ActionSheet> |
{ | ||
"name": "@expo/react-native-action-sheet", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A cross-platform ActionSheet for React Native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
0
14026
410