Skip to content

Commit 862d50a

Browse files
README edited for react-native
1 parent 1098d58 commit 862d50a

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,45 @@ Reactjs chat elements
44
## Install
55

66
```
7-
npm install react-chat-elements@latest --save
7+
npm install react-chat-elements --save
88
```
99

10+
### For React Native
11+
Step 1: Install react-chat-elements
12+
13+
```
14+
npm install react-chat-elements --save
15+
```
16+
17+
If you have already installed react-native-vector-icons as a dependency for your project you can skip this step. Otherwise run the following command:
18+
19+
Step 2: Install react-native-vector-icons
20+
21+
```
22+
npm i --save react-native-vector-icons
23+
```
24+
25+
**Link:**
26+
27+
```
28+
react-native link react-native-vector-icons
29+
```
30+
31+
*If you have any issues installing react-native-vector-icons, check out their installation guide [here](https://github.com/oblador/react-native-vector-icons#installation).*
1032

1133
### Imports
1234
```javascript
1335
// RCE CSS
1436
import 'react-chat-elements/dist/main.css';
1537
// MessageBox component
16-
import {MessageBox} from 'react-chat-elements';
38+
import { MessageBox } from 'react-chat-elements';
1739
```
1840

41+
#### React Native
42+
```javascript
43+
// MessageBox component
44+
import { MessageBox } from 'react-chat-elements/native';
45+
```
1946

2047
## Components
2148
1. [ChatItem](#chatitem-component)

0 commit comments

Comments
 (0)