Extension to easily inject comments whatsapp like in your application.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts
src
test
.eslintrc
.gitignore
.npmignore
.travis.yml
README.md
package.json
server.js
webpack.config.js

README.md

Focus comments

Comments extension for the Focus solution.

image

Installation

npm i -S focus-comments

Please note that you must you React with addons, so choose the appropriate built files to have React.addons defined.

Usage

<FocusComments {...props}/>

Props

  • apiRootUrl (string): the API url,
  • concept (string): the concept to plug the comments on,
  • conceptId (string | number): the concept id,
  • userPictureResolver (function): a function that takes the user id as an input, and returns the user picture url as an ouput,
  • texts :
    • placeholder (string): placeholder for the input field,
    • send (string): send button caption,
    • edit (string): edit button caption,
    • cancel (string): cancel button caption,
    • title (string): title caption,
    • singleComment (string): single comment caption,
    • comments (string): comments caption,
    • lastUpdate (string): last update caption,
    • loading (string): loading caption,
    • empty (string): empty caption
  • locale (string): application locale (from momentJS),
  • currentUserId (number): the current user id
  • messageSentCallback (function): a callback to know when a message has been sent
  • timeDisplay (string): the display format, either ago or dateTime, ago by default
  • dateTimeFormat (string): the dateTime format if timeDisplay is set to dateTime
  • registerRefreshCommentsMethod (function): method to register the refresh comment method into parent
  • unregisterRefreshCommentsMethod (function): method to unregister the refresh comment method from parent