Wire up chat message props. Add username highlighting. Closes #1921
This commit is contained in:
@@ -32,7 +32,13 @@ const AddMessagesChatExample = args => {
|
||||
<button type="button" onClick={() => setChatMessages([...chatMessages, chatMessages[0]])}>
|
||||
Add message
|
||||
</button>
|
||||
<ChatContainer messages={chatMessages} loading={loading} />
|
||||
<ChatContainer
|
||||
messages={chatMessages}
|
||||
loading={loading}
|
||||
usernameToHighlight={null}
|
||||
chatUserId={null}
|
||||
isModerator={false}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -92,3 +92,10 @@ FromAuthenticatedUser.args = {
|
||||
message: authenticatedUserMessage,
|
||||
showModeratorMenu: false,
|
||||
};
|
||||
|
||||
export const WithStringHighlighted = Template.bind({});
|
||||
WithStringHighlighted.args = {
|
||||
message: standardMessage,
|
||||
showModeratorMenu: false,
|
||||
highlightString: 'message',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user