Comments extension for the Focus solution.
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.
<FocusComments {...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
- placeholder (
- 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, eitherago
ordateTime
,ago
by default - dateTimeFormat (
string
): the dateTime format if timeDisplay is set todateTime
- registerRefreshCommentsMethod (
function
): method to register the refresh comment method into parent - unregisterRefreshCommentsMethod (
function
): method to unregister the refresh comment method from parent