Skip to content

Commit

Permalink
update sponsor
Browse files Browse the repository at this point in the history
  • Loading branch information
FaridSafi committed Apr 13, 2019
1 parent 2baab97 commit 933a56a
Show file tree
Hide file tree
Showing 57 changed files with 42 additions and 12,190 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ android
ios
example
example-slack-message
example-pusher-chatkit
example-expo
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
example/
example-expo/
example-slack-message/
example-pusher-chatkit/
TODO.md
screenshots/
.babelrc
Expand All @@ -10,3 +9,4 @@ README.md
ISSUE_TEMPLATE.md
circle.yml
codecov.yml
media/
69 changes: 41 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
💬 Gifted Chat
</h3>
<p align="center">
The most complete chat UI for React Native <br/>
<small>formerly known as Gifted Messenger</small>
The most complete chat UI for React Native
</p>
<p align="center">
<a href="https://www.npmjs.com/package/react-native-gifted-chat">
Expand All @@ -34,6 +33,17 @@
<a href="https://snack.expo.io/@xcarpentier/gifted-chat" target="_blank"><i>demo</i></a>
</p>

## Sponsor

<p align="center">
<img src="https://raw.githubusercontent.com/FaridSafi/react-native-gifted-chat/sponsor-lereacteur/media/logo_sponsor.png">
<br>
<p align="center">
Coding Bootcamp in Paris co-founded by Farid Safi
</p>
<a href="https://www.lereacteur.io" target="_blank">Click to learn more 🙌</a>
</p>

## Features

- Fully customizable components
Expand Down Expand Up @@ -70,35 +80,35 @@
## Example

```jsx
import React from 'react'
import { GiftedChat } from 'react-native-gifted-chat'
import React from "react";
import { GiftedChat } from "react-native-gifted-chat";

class Example extends React.Component {
state = {
messages: [],
}
messages: []
};

componentWillMount() {
this.setState({
messages: [
{
_id: 1,
text: 'Hello developer',
text: "Hello developer",
createdAt: new Date(),
user: {
_id: 2,
name: 'React Native',
avatar: 'https://placeimg.com/140/140/any',
},
},
],
})
name: "React Native",
avatar: "https://placeimg.com/140/140/any"
}
}
]
});
}

onSend(messages = []) {
this.setState(previousState => ({
messages: GiftedChat.append(previousState.messages, messages),
}))
messages: GiftedChat.append(previousState.messages, messages)
}));
}

render() {
Expand All @@ -107,10 +117,10 @@ class Example extends React.Component {
messages={this.state.messages}
onSend={messages => this.onSend(messages)}
user={{
_id: 1,
_id: 1
}}
/>
)
);
}
}
```
Expand Down Expand Up @@ -209,20 +219,23 @@ e.g. System Message
- **`onInputTextChanged`** _(Function)_ - Callback when the input text changes
- **`maxInputLength`** _(Integer)_ - Max message composer TextInput length
- **`parsePatterns`** _(Function)_ - Custom parse patterns for [react-native-parsed-text](https://github.com/taskrabbit/react-native-parsed-text) used to linkify message content (like URLs and phone numbers), e.g.:
```js
<GiftedChat
parsePatterns={(linkStyle) => [
{ type: 'phone', style: linkStyle, onPress: this.onPressPhoneNumber },
{ pattern: /#(\w+)/, style: { ...linkStyle, styles.hashtag }, onPress: this.onPressHashtag },
]}
/>
```

```js
<GiftedChat
parsePatterns={(linkStyle) => [
{ type: 'phone', style: linkStyle, onPress: this.onPressPhoneNumber },
{ pattern: /#(\w+)/, style: { ...linkStyle, styles.hashtag }, onPress: this.onPressHashtag },
]}
/>
```

- **`extraData`** _(Object)_ - Extra props for re-rendering FlatList on demand. This will be useful for rendering footer etc.
- **`minComposerHeight`** _(Object)_ - Custom min height of the composer.
- **`maxComposerHeight`** _(Object)_ - Custom max height of the composer.
* **`scrollToBottom`** _(Bool)_ - Enables the scrollToBottom Component (Default is false)
* **`scrollToBottomComponent`** _(Function)_ - Custom Scroll To Bottom Component container
* **`scrollToBottomOffset`** _(Integer)_ - Custom Height Offset upon which to begin showing Scroll To Bottom Component (Default is 200)

* **`scrollToBottom`** _(Bool)_ - Enables the scrollToBottom Component (Default is false)
* **`scrollToBottomComponent`** _(Function)_ - Custom Scroll To Bottom Component container
* **`scrollToBottomOffset`** _(Integer)_ - Custom Height Offset upon which to begin showing Scroll To Bottom Component (Default is 200)
* **`alignTop`** _(Boolean)_ Controls whether or not the message bubbles appear at the top of the chat (Default is false - bubbles align to bottom)

## Imperative methods
Expand Down
3 changes: 0 additions & 3 deletions example-pusher-chatkit/.babelrc

This file was deleted.

6 changes: 0 additions & 6 deletions example-pusher-chatkit/.buckconfig

This file was deleted.

54 changes: 0 additions & 54 deletions example-pusher-chatkit/.flowconfig

This file was deleted.

1 change: 0 additions & 1 deletion example-pusher-chatkit/.gitattributes

This file was deleted.

56 changes: 0 additions & 56 deletions example-pusher-chatkit/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion example-pusher-chatkit/.watchmanconfig

This file was deleted.

8 changes: 0 additions & 8 deletions example-pusher-chatkit/App.js

This file was deleted.

75 changes: 0 additions & 75 deletions example-pusher-chatkit/MyChat.js

This file was deleted.

26 changes: 0 additions & 26 deletions example-pusher-chatkit/README.md

This file was deleted.

Loading

0 comments on commit 933a56a

Please sign in to comment.