react-native-autoheight-webview
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -14,2 +14,3 @@ 'use strict' | ||
Dimensions, | ||
StyleSheet, | ||
Platform, | ||
@@ -176,7 +177,5 @@ UIManager, | ||
return ( | ||
<Animated.View style={[{ | ||
<Animated.View style={[Styles.container, { | ||
opacity: enableAnimation ? this.opacityAnimatedValue : 1, | ||
width: ScreenWidth, | ||
height: height + heightOffset, | ||
backgroundColor: 'transparent' | ||
}, style]}> | ||
@@ -187,6 +186,3 @@ { | ||
ref={webview => this.webview = webview} | ||
style={{ | ||
flex: 1, | ||
backgroundColor: 'transparent' | ||
}} | ||
style={Styles.webView} | ||
javaScriptEnabled={true} | ||
@@ -237,2 +233,13 @@ injectedJavaScript={script + customScript} | ||
const Styles = StyleSheet.create({ | ||
container: { | ||
width: ScreenWidth, | ||
backgroundColor: 'transparent' | ||
}, | ||
webView: { | ||
flex: 1, | ||
backgroundColor: 'transparent' | ||
} | ||
}); | ||
const BaseScript = | ||
@@ -239,0 +246,0 @@ IsBelowKitKat ? |
@@ -11,2 +11,3 @@ 'use strict' | ||
Dimensions, | ||
StyleSheet, | ||
View, | ||
@@ -88,13 +89,8 @@ WebView | ||
return ( | ||
<Animated.View style={[{ | ||
<Animated.View style={[Styles.container, { | ||
opacity: enableAnimation ? this.opacityAnimatedValue : 1, | ||
width: ScreenWidth, | ||
height: height + heightOffset, | ||
backgroundColor: 'transparent' | ||
}, style]}> | ||
<WebView | ||
style={{ | ||
flex: 1, | ||
backgroundColor: 'transparent' | ||
}} | ||
style={Styles.webView} | ||
injectedJavaScript={script + customScript} | ||
@@ -135,2 +131,13 @@ scrollEnabled={false} | ||
const Styles = StyleSheet.create({ | ||
container: { | ||
width: ScreenWidth, | ||
backgroundColor: 'transparent' | ||
}, | ||
webView: { | ||
flex: 1, | ||
backgroundColor: 'transparent' | ||
} | ||
}); | ||
// note that it can not get height when there are only text objects in a html body which does not make any sense | ||
@@ -137,0 +144,0 @@ const BaseScript = |
{ | ||
"name": "react-native-autoheight-webview", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "An auto height webview for React Native", | ||
@@ -5,0 +5,0 @@ "main": "autoHeightWebView", |
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
83032
368