@mentions receive support

This commit is contained in:
Josh Perez 2020-09-16 18:42:48 -04:00 committed by Josh Perez
parent c126a71864
commit 9657c38987
18 changed files with 555 additions and 23 deletions

View file

@ -45,6 +45,7 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
authorColor: overrideProps.authorColor || 'blue',
authorAvatarPath: overrideProps.authorAvatarPath,
authorTitle: text('authorTitle', overrideProps.authorTitle || ''),
bodyRanges: overrideProps.bodyRanges,
canReply: true,
clearSelectedMessage: action('clearSelectedMessage'),
collapseMetadata: overrideProps.collapseMetadata,
@ -769,3 +770,19 @@ story.add('Colors', () => {
</>
);
});
story.add('@Mentions', () => {
const props = createProps({
bodyRanges: [
{
start: 0,
length: 1,
mentionUuid: 'zap',
replacementText: 'Zapp Brannigan',
},
],
text: '\uFFFC This Is It. The Moment We Should Have Trained For.',
});
return renderBothDirections(props);
});