Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e99d04c

Browse files
committedJun 8, 2019
doc: add readme
1 parent 777c6d3 commit e99d04c

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed
 

‎README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# React Native Progress WebView
2+
3+
![npm](https://img.shields.io/npm/dy/react-native-progress-webview.svg) ![npm](https://img.shields.io/npm/v/react-native-progress-webview.svg) ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/wangdicoder/react-native-progress-webview.svg) [![star this repo](http://githubbadges.com/star.svg?user=wangdicoder&repo=https://github.com/wangdicoder/react-native-progress-webview&style=flat)](https://github.com/wangdicoder/https://github.com/wangdicoder/react-native-progress-webview) ![NPM](https://img.shields.io/npm/l/react-native-progress-webview.svg)
4+
5+
**React Native Progress WebView** is a wrapper of [React Native WebView](https://github.com/react-native-community/react-native-webview) to provide the loading status.
6+
7+
## Platforms Supported
8+
9+
- [x] iOS (both UIWebView and WKWebView)
10+
- [x] Android
11+
12+
## Getting Started
13+
14+
Read our [Getting Started Guide](https://github.com/react-native-community/react-native-webview) on React Native WebView page to configure the webview component.
15+
16+
## Usage
17+
18+
Import the `WebView` component from `react-native-webview` and use it like so:
19+
20+
```jsx
21+
import React, { Component } from 'react';
22+
import { StyleSheet, Text, View } from 'react-native';
23+
import ProgressWebView from "react-native-progess-webview";
24+
25+
// ...
26+
class App extends Component {
27+
render() {
28+
return (
29+
<ProgressWebView source={{ uri: 'https://facebook.github.io/react-native/' }} />
30+
);
31+
}
32+
}
33+
```
34+
35+
## API
36+
37+
**React Native Progress Webview** supports all React Native Webview props. Read the [API Reference](https://github.com/react-native-community/react-native-webview/blob/master/docs/Reference.md) to explore. There are a couple of exclusive props related to the loading bar.
38+
39+
| prop | type | default | description |
40+
| ----------------- | ------ | ------- | ------------------------------------------------------- |
41+
| color | string | #3B78E7 | normal color of loading bar |
42+
| errorColor | string | #f30 | error color of loading bar |
43+
| disappearDuration | number | 300 | the visible duration after loading bar loading finished |
44+
45+
## License
46+
47+
MIT

‎package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "react-native-progress-webview",
3-
"version": "1.0.0",
3+
"version": "0.1.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
99
"keywords": [],
1010
"author": "Di Wang<wangdicoder@gmail.com>",
11-
"license": "ISC",
11+
"license": "MIT",
1212
"dependencies": {
1313
"prop-types": "^15.7.2"
1414
},

0 commit comments

Comments
 (0)
Please sign in to comment.