Skip to content

Commit 8864c4b

Browse files
committed
init commit
0 parents  commit 8864c4b

File tree

7 files changed

+122
-0
lines changed

7 files changed

+122
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
3+
/node_modules

README.md

Whitespace-only changes.

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ProgressBarWebView from "./lib/webview";
2+
3+
export default ProgressBarWebView;

lib/loading-bar.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import { View, StyleSheet } from 'react-native';
3+
4+
const LoadingBar = () => (
5+
<View>
6+
7+
</View>
8+
);
9+
10+
export default LoadingBar;

lib/webview.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react';
2+
import { View, StyleSheet } from 'react-native';
3+
import WebView from 'react-native-webview';
4+
import PropTypes from 'prop-types';
5+
import LoadingBar from "./loading-bar";
6+
7+
export default class ProgressBarWebView extends React.PureComponent {
8+
9+
static propTypes = {
10+
color: PropTypes.string,
11+
};
12+
13+
render() {
14+
return (
15+
<View className={styles.container}>
16+
<LoadingBar />
17+
<WebView {...this.props}/>
18+
</View>
19+
);
20+
}
21+
}
22+
23+
const styles = StyleSheet.create({
24+
container: {
25+
position: 'relative',
26+
},
27+
});

package-lock.json

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "react-native-progress-webview",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "Di Wang<wangdicoder@gmail.com>",
11+
"license": "ISC",
12+
"dependencies": {
13+
"prop-types": "^15.7.2",
14+
"react-native-webview": "^5.11.0"
15+
}
16+
}

0 commit comments

Comments
 (0)