MentionNode: add Tooltip

environments/review-nostr-ment-bugkb8/deployments/4172
Alex Gleason 2023-10-13 17:29:52 -05:00
rodzic 5aacfe299a
commit f6d60c243a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 11 dodań i 8 usunięć

Wyświetl plik

@ -8,6 +8,8 @@ import { addClassNamesToElement } from '@lexical/utils';
import { $applyNodeReplacement, DecoratorNode } from 'lexical'; import { $applyNodeReplacement, DecoratorNode } from 'lexical';
import React from 'react'; import React from 'react';
import { Tooltip } from 'soapbox/components/ui';
import type { import type {
EditorConfig, EditorConfig,
LexicalNode, LexicalNode,
@ -79,14 +81,15 @@ class MentionNode extends DecoratorNode<JSX.Element> {
const username = acct.split('@')[0]; const username = acct.split('@')[0];
return ( return (
<button <Tooltip text={`@${acct}`}>
className='text-accent-blue' <button
type='button' className='text-accent-blue'
title={`@${acct}`} type='button'
dir='ltr' dir='ltr'
> >
@{username} @{username}
</button> </button>
</Tooltip>
); );
} }