Wire up chat message props. Add username highlighting. Closes #1921

This commit is contained in:
Gabe Kangas
2022-06-24 21:30:54 -07:00
parent b7df2949e4
commit e08037b64a
13 changed files with 141 additions and 143 deletions

View File

@@ -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>
);
};

View File

@@ -92,3 +92,10 @@ FromAuthenticatedUser.args = {
message: authenticatedUserMessage,
showModeratorMenu: false,
};
export const WithStringHighlighted = Template.bind({});
WithStringHighlighted.args = {
message: standardMessage,
showModeratorMenu: false,
highlightString: 'message',
};