Skip to content

Commit

Permalink
update npm description
Browse files Browse the repository at this point in the history
  • Loading branch information
FaridSafi committed Apr 16, 2016
1 parent ae711a8 commit 3bbfc2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Farid from Safi
Copyright (c) 2016 Farid from Safi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-gifted-messenger",
"version": "0.1.0",
"description": "The chat of your next React-Native Apps",
"version": "0.1.1",
"description": "Chat UI for iOS & Android React-Native apps",
"main": "GiftedMessenger.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down Expand Up @@ -32,19 +32,12 @@
"moment": "^2.10.6",
"react-native-button": "^1.3.1",
"react-native-gifted-spinner": "0.0.3",
"react-native-parsed-text": "0.0.11"
"react-native-parsed-text": "0.0.11"
},
"devDependencies": {
"eslint": "^2.7.0",
"eslint-config-airbnb": "^7.0.0",
"eslint-plugin-react": "^4.3.0",
"eslint-plugin-jsx-a11y": "^0.6.2"
},
"gitHead": "a37196cdb9f528825c81c713844e64ccb0d7e223",
"readme": "# Gifted Messenger\nReady-to-use chat interface for iOS and Android React-Native apps\n\nDependency: React-Native >= v0.18.0-rc (onLayout prop on ListView is required)\n\n\n![](https://raw.githubusercontent.com/FaridSafi/react-native-gifted-messenger/master/screenshots/messenger-1.png)\n![](https://raw.githubusercontent.com/FaridSafi/react-native-gifted-messenger/master/screenshots/messenger-2.png)\n\n\n### Changelog\n- 0.0.11 Split into separate components (PR @Froelund), better performance by removing react-native-invertible-scroll-view\n- 0.0.10 forceRenderImage, onCustomSend, renderCustomText props (PR @oney)\n- 0.0.9 Fix iPhone 6 Plus textInput border\n- 0.0.8 Fix issue with RN 0.16.0 Thanks @wenkesj for PR\n- 0.0.7 Temporary disabling react-native-parsed-text plugin\n\n### Example\n\n```js\nvar GiftedMessenger = require('react-native-gifted-messenger');\nvar {Dimensions} = React;\n\nvar GiftedMessengerExample = React.createClass({\n getMessages() {\n return [\n {text: 'Are you building a chat app?', name: 'React-Native', image: {uri: 'https://facebook.github.io/react/img/logo_og.png'}, position: 'left', date: new Date(2015, 0, 16, 19, 0)},\n {text: \"Yes, and I use Gifted Messenger!\", name: 'Developer', image: null, position: 'right', date: new Date(2015, 0, 17, 19, 0)},\n ];\n },\n handleSend(message = {}, rowID = null) {\n // Send message.text to your server\n },\n handleReceive() {\n this._GiftedMessenger.appendMessage({\n text: 'Received message', \n name: 'Friend', \n image: {uri: 'https://facebook.github.io/react/img/logo_og.png'}, \n position: 'left', \n date: new Date(),\n });\n },\n render() {\n return (\n <GiftedMessenger\n ref={(c) => this._GiftedMessenger = c}\n\n messages={this.getMessages()}\n handleSend={this.handleSend}\n maxHeight={Dimensions.get('window').height - 64} // 64 for the navBar\n \n styles={{\n bubbleLeft: {\n backgroundColor: '#e6e6eb',\n marginRight: 70,\n },\n bubbleRight: {\n backgroundColor: '#007aff',\n marginLeft: 70,\n },\n }}\n />\n );\n },\n});\n```\n\n### Advanced example\n\nSee [GiftedMessengerExample/GiftedMessengerExample.js](https://raw.githubusercontent.com/FaridSafi/react-native-gifted-messenger/master/GiftedMessengerExample/GiftedMessengerExample.js)\n\n\n### Installation\n\n```npm install react-native-gifted-messenger --save```\n\n\n### Props\n\n\n| Props name | Type | Description | Platform | Default |\n| ----------------------------- | -------- | -------------------------------------------------------------------------- | -------- | -------------------------------- |\n| messages | Array | List of messages to display | Both | [] |\n| displayNames | Boolean | Display or not the name of the interlocutor(s) | Both | true |\n| placeholder | String | TextInput placeholder | Both | 'Type a message...' |\n| styles | Function | Styles of children components - See GiftedMessenger.js/componentWillMount | Both | {} |\n| autoFocus | Boolean | TextInput auto focus | Both | true |\n| onErrorButtonPress | Function | Called when the re-send button is pressed | Both | (message, rowID) => {} |\n| loadEarlierMessagesButton | Boolean | Display or not the button to load earlier message | Both | false |\n| loadEarlierMessagesButtonText | String | Label of the 'Load Earlier Messages' button | Both | 'Load earlier messages' |\n| onLoadEarlierMessages | Function | Called when 'Load Earlier Message' button is pressed | Both | (oldestMessage, callback) => {} |\n| handleSend | Function | Called when a message is Sent | Both | (message, rowID) => {} |\n| maxHeight | Integer | Max height of the component | Both | Dimensions.get('window').height |\n| senderName | String | Name of the sender of the messages | Both | 'Sender' |\n| senderImage | Object | Image of the sender | Both | null |\n| sendButtonText | String | 'Send' button label | Both | 'Send' |\n| onImagePress | Function | Called when the image of a message is pressed | Both | (rowData, rowID) => {} |\n| parseText | Boolean | If the text has to be parsed with taskrabbit/react-native-parsed-text | iOS | true |\n| handleUrlPress | Function | Called when a parsed url is pressed | iOS | (url) => {} |\n| handlePhonePress | Function | Called when a parsed phone number is pressed | iOS | (phone) => {} |\n| handleEmailPress | Function | Called when a parsed email is pressed | iOS | (email) => {} |\n| hideTextInput | Boolean | Hide or not the text input | Both | false |\n| keyboardDismissMode | String | Method to dismiss the keyboard when dragging (none, interactive, on-drag) | Both | on-drag |\n| returnKeyType | Boolean | Determine if pressing 'send' will trigger handleSend | iOS | false |\n| submitOnReturn | Boolean | Send message when clicking on submit | Both | false |\n| forceRenderImage | Boolean | Always render the users images (avatar) | Both | false |\n| onCustomSend | Function | If you want to implement a progress bar. See PR #16 | Both | (message) => {} |\n| renderCustomText | Function | Implement your own text rendering | Both | (rowData, rowID) => {} |\n\n\n### Props update\n\nThe UI is updated when receiving new ```messages``` prop.\n\n\n### API\n\n- ```appendMessages(messages = [])``` // Add messages at the end of the list view\n\n- ```appendMessage(message = {})``` // Add 1 message at the end of the list view\n\n- ```prependMessages(messages = [])``` // Add messages at the begining of the list view\n\n- ```prependMessage(message = {})``` // Add 1 message at the begining of the list view\n\n- ```setMessageStatus(status = '', rowID)``` // Set the status of a message ('ErrorButton', 'Sent', 'Seen', 'Anything you want')\n\n- ```getMessage(rowID)``` // Get message object by rowID\n\n- ```getPreviousMessage(rowID)``` // Get previous message object of a rowID\n\n- ```getNextMessage(rowID)``` // Get next message object of a rowID\n\n\n### Message object\n\n```js\nvar message = {\n text: 'Message content', \n name: \"Sender's name\", \n image: {uri: 'https://facebook.github.io/react/img/logo_og.png'}, \n position: 'left', // left if received, right if sent\n date: new Date(),\n // ...any attributes you want\n};\n```\n\n### License\n\n[MIT](LICENSE)\n\n\n\nFeel free to ask me questions on Twitter [@FaridSafi](https://www.twitter.com/FaridSafi) !\n",
"readmeFilename": "README.md",
"_id": "react-native-gifted-messenger@0.0.13",
"_shasum": "5323ecac87e6e4467057d6f963304ec9ca128ad7",
"_from": "git+https://github.com/FaridSafi/react-native-gifted-messenger.git",
"_resolved": "git+https://github.com/FaridSafi/react-native-gifted-messenger.git#a37196cdb9f528825c81c713844e64ccb0d7e223"
}
}

0 comments on commit 3bbfc2a

Please sign in to comment.