Skip to content

Commit 1f7451d

Browse files
authored
Add badges and linking instructions (#20)
Add badges and linking instructions
2 parents 96eb45d + 7bda984 commit 1f7451d

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
# @react-native-community/progress-bar-android
33

4+
[![Build Status][build-badge]][build]
5+
[![Version][version-badge]][package]
6+
![Supports Android][support-badge]
7+
[![MIT License][license-badge]][license]
48
[![Lean Core Badge][lean-core-badge]][lean-core-issue]
59

610
## Getting started
@@ -31,19 +35,33 @@ yarn android
3135

3236
### Mostly automatic installation
3337

38+
- `react-native >= 0.60`
39+
40+
The package is [automatically linked](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) when building the app. All you need to do is:
41+
42+
``` ```
43+
cd ios && pod install
44+
``` ```
45+
46+
- `react-native < 0.59`
47+
48+
Run the following commands
3449
`$ react-native link @react-native-community/progress-bar-android`
3550

3651
### Manual installation
3752

38-
39-
#### iOS
53+
<details>
54+
<summary>Manually linking the library - iOS</summary>
4055

4156
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
4257
2. Go to `node_modules``@react-native-community/progress-bar-android` and add `RNCAndroidprogressbar.xcodeproj`
4358
3. In XCode, in the project navigator, select your project. Add `libRNCAndroidprogressbar.a` to your project's `Build Phases``Link Binary With Libraries`
44-
4. Run your project (`Cmd+R`)<
59+
4. Run your project (`Cmd+R`)
60+
61+
</details>
4562

46-
#### Android
63+
<details>
64+
<summary>Manually link the library - android</summary>
4765

4866
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
4967
- Add `import com.reactnativecommunity.androidprogressbar.RNCAndroidprogressbarPackage;` to the imports at the top of the file
@@ -58,6 +76,7 @@ yarn android
5876
implementation project(':@react-native-community_progress-bar-android')
5977
```
6078

79+
</details>
6180

6281
## Usage
6382
```jsx
@@ -75,5 +94,12 @@ export const Example = () => {
7594

7695
```
7796

97+
[build-badge]: https://img.shields.io/circleci/project/github/react-native-community/react-native-progress-bar-android/master.svg?style=flat-square
98+
[build]: https://circleci.com/gh/react-native-community/react-native-progress-bar-android
99+
[version-badge]: https://img.shields.io/npm/v/@react-native-community/progress-bar-android.svg?style=flat-square
100+
[package]: https://www.npmjs.com/package/@react-native-community/progress-bar-android
101+
[support-badge]:https://img.shields.io/badge/platforms-android-lightgrey.svg?style=flat-square
102+
[license-badge]: https://img.shields.io/npm/l/@react-native-community/progress-bar-android.svg?style=flat-square
103+
[license]: https://opensource.org/licenses/MIT
78104
[lean-core-badge]: https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg?style=flat-square
79105
[lean-core-issue]: https://github.com/facebook/react-native/issues/23313

0 commit comments

Comments
 (0)