Fix rendering of long names in <ProfileChangeNotification>

This commit is contained in:
Evan Hahn 2021-09-02 11:07:30 -05:00 committed by GitHub
parent f82012f129
commit c251726698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -47,4 +47,21 @@ storiesOf('Components/Conversation/ProfileChangeNotification', module)
}}
/>
);
})
.add('From contact with long names before and after', () => {
return (
<ProfileChangeNotification
i18n={i18n}
changedContact={getDefaultConversation({
id: 'some-guid',
type: 'direct',
title: 'Mr. Fire 🔥',
})}
change={{
type: 'name',
oldName: '💅🤷🏽‍♀️🏯'.repeat(50),
newName: '☎️🎉🏝'.repeat(50),
}}
/>
);
});

View file

@ -24,7 +24,9 @@ export function ProfileChangeNotification(props: PropsType): JSX.Element {
return (
<div className="SystemMessage">
<div className="SystemMessage__icon SystemMessage__icon--profile" />
<Emojify text={message} />
<span>
<Emojify text={message} />
</span>
</div>
);
}