-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kyle Barron
committed
Dec 10, 2019
1 parent
27a3ac8
commit d9a8c5d
Showing
4 changed files
with
57 additions
and
1 deletion.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { View, StyleSheet } from 'react-native'; | ||
import { Appbar } from 'react-native-paper'; | ||
import { WebView } from 'react-native-webview'; | ||
|
||
const WebViewComponent = props => { | ||
return <WebView source={{ uri: props.uri }} />; | ||
}; | ||
|
||
// TODO: change navigation.toggleDrawer to goBack()? | ||
class WebviewScreen extends React.Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Appbar.Header> | ||
<Appbar.BackAction | ||
onPress={() => this.props.navigation.toggleDrawer()} | ||
/> | ||
<Appbar.Content title="Webview" /> | ||
</Appbar.Header> | ||
<WebViewComponent | ||
style={styles.webView} | ||
uri="https://en.wikipedia.org/wiki/Yosemite_National_Park" | ||
/> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
webView: { | ||
flex: 1, | ||
}, | ||
container: { | ||
flex: 1, | ||
}, | ||
}); | ||
|
||
export default WebviewScreen; |
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