Skip to content

Commit 4192815

Browse files
author
alvaromb
committed
updated Readme
1 parent 5613133 commit 4192815

1 file changed

Lines changed: 50 additions & 23 deletions

File tree

README.md

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,72 @@
1-
21
# react-native-interactive-image-library
32

3+
<p>
4+
<img src="https://img.shields.io/npm/dm/react-native-interactive-image-library.svg" />
5+
<img src="https://img.shields.io/npm/dt/react-native-interactive-image-library.svg" />
6+
</p>
7+
8+
A React Native component to display a gallery of images.
9+
10+
<p align="center">
11+
<img src="https://raw.githubusercontent.com/wiki/InterfaceKit/react-native-interactive-image-library/ios.gif" alt="iOS" width="400">
12+
<img src="https://raw.githubusercontent.com/wiki/InterfaceKit/react-native-interactive-image-library/android.gif" alt="Android" width="400">
13+
</p>
14+
415
## Getting started
516

6-
`$ npm install react-native-interactive-image-library --save`
17+
`$ yarn add react-native-interactive-image-library`
718

819
### Mostly automatic installation
920

1021
`$ react-native link react-native-interactive-image-library`
1122

1223
### Manual installation
1324

14-
1525
#### iOS
1626

17-
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
18-
2. Go to `node_modules``react-native-interactive-image-library` and add `RNIKInteractiveImageLibrary.xcodeproj`
19-
3. In XCode, in the project navigator, select your project. Add `libRNIKInteractiveImageLibrary.a` to your project's `Build Phases``Link Binary With Libraries`
27+
1. In Xcode, in the project navigator, right click `Libraries` ➜ `Add Files to
28+
[your project's name]`
29+
2. Go to `node_modules``react-native-interactive-image-library` and add
30+
`RNIKInteractiveImageLibrary.xcodeproj`
31+
3. In XCode, in the project navigator, select your project. Add
32+
`libRNIKInteractiveImageLibrary.a` to your project's `Build Phases` ➜ `Link
33+
Binary With Libraries`
2034
4. Run your project (`Cmd+R`)<
2135

2236
#### Android
2337

24-
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
25-
- Add `import com.apsl.interfacekit.RNIKInteractiveImageLibraryPackage;` to the imports at the top of the file
26-
- Add `new RNIKInteractiveImageLibraryPackage()` to the list returned by the `getPackages()` method
27-
2. Append the following lines to `android/settings.gradle`:
28-
```
29-
include ':react-native-interactive-image-library'
30-
project(':react-native-interactive-image-library').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactive-image-library/android')
31-
```
32-
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
33-
```
34-
compile project(':react-native-interactive-image-library')
35-
```
36-
38+
No additional setup needed.
3739

3840
## Usage
41+
3942
```javascript
40-
import RNIKInteractiveImageLibrary from 'react-native-interactive-image-library';
43+
import ImageBrowser from 'react-native-interactive-image-gallery';
4144

42-
// TODO: What to do with the module?
43-
RNIKInteractiveImageLibrary;
45+
class Images extends React.PureComponent<Props> {
46+
render() {
47+
const imageURLs: Array<Object> = this.props.images.map(
48+
(img: Object, index: number) => ({
49+
URI: img.uri,
50+
id: String(index),
51+
title: img.title,
52+
description: img.description
53+
})
54+
);
55+
return <ImageBrowser images={imageURLs} />;
56+
}
57+
}
4458
```
45-
59+
60+
## API
61+
62+
Work in progress.
63+
64+
## License
65+
66+
MIT.
67+
68+
## Author
69+
70+
Álvaro Medina Ballester `<amedina at apsl.net>`
71+
72+
Built with 💛 by [APSL](https://github.com/apsl).

0 commit comments

Comments
 (0)