Emojify note and add non-nickname tooltip
This commit is contained in:
parent
4d794eaf14
commit
b6afa47126
9 changed files with 47 additions and 10 deletions
|
@ -7,6 +7,8 @@ import type { LocalizerType } from '../types/I18N';
|
|||
import { Button, ButtonVariant } from './Button';
|
||||
import { Modal } from './Modal';
|
||||
import { Linkify } from './conversation/Linkify';
|
||||
import type { RenderTextCallbackType } from '../types/Util';
|
||||
import { Emojify } from './conversation/Emojify';
|
||||
|
||||
export type NotePreviewModalProps = Readonly<{
|
||||
conversation: ConversationType;
|
||||
|
@ -15,6 +17,10 @@ export type NotePreviewModalProps = Readonly<{
|
|||
onEdit: () => void;
|
||||
}>;
|
||||
|
||||
const renderNonLink: RenderTextCallbackType = ({ key, text }) => {
|
||||
return <Emojify key={key} text={text} />;
|
||||
};
|
||||
|
||||
export function NotePreviewModal({
|
||||
conversation,
|
||||
i18n,
|
||||
|
@ -40,7 +46,7 @@ export function NotePreviewModal({
|
|||
}
|
||||
>
|
||||
<div dir="auto">
|
||||
<Linkify text={conversation.note ?? ''} />
|
||||
<Linkify text={conversation.note ?? ''} renderNonLink={renderNonLink} />
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue