Skip to content

Commit 9656fa5

Browse files
Tooltip Added for all icons in Share Card (#152)
* Tooltip Added for all icons in Share Card * Spelling Bug Fixed
1 parent 4bca20e commit 9656fa5

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

src/components/ShareButton.tsx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { GoCopy, GoDownload, GoX } from 'react-icons/go';
55
import { track } from '@/constants/events';
66
import toast from 'react-hot-toast';
77
import { logException } from '@/utils/logger';
8+
import { Tooltip } from 'react-tooltip';
89

910
type ShareButtonProps = {
1011
imageUrl?: string;
@@ -279,35 +280,59 @@ const ShareMenu2 = ({
279280
isSelected={optionSelected === ShareOption.COPY}
280281
onClick={selectCopy}
281282
>
282-
<GoCopy size={20} />
283+
<Tooltip id="go-copy" />
284+
<GoCopy
285+
data-tooltip-id="go-copy"
286+
data-tooltip-content="Copy"
287+
size={20}
288+
/>
283289
</Button>
284290

285291
<Button
286292
isSelected={optionSelected === ShareOption.TWEET}
287293
onClick={selectTweet}
288294
>
289-
<CiTwitter size={20} />
295+
<Tooltip id="ci-twitter" />
296+
<CiTwitter
297+
data-tooltip-id="ci-twitter"
298+
data-tooltip-content="Share on X"
299+
size={20}
300+
/>
290301
</Button>
291302

292303
<Button
293304
isSelected={optionSelected === ShareOption.LINKEDIN}
294305
onClick={selectLinkedIn}
295306
>
296-
<CiLinkedin size={18} />
307+
<Tooltip id="ci-linkedIn" />
308+
<CiLinkedin
309+
data-tooltip-id="ci-linkedIn"
310+
data-tooltip-content="Share on LinkedIn"
311+
size={18}
312+
/>
297313
</Button>
298314

299315
<Button
300316
isSelected={optionSelected === ShareOption.DOWNLOAD}
301317
onClick={selectDownload}
302318
>
303-
<GoDownload size={18} />
319+
<Tooltip id="go-download" />
320+
<GoDownload
321+
data-tooltip-id="go-download"
322+
data-tooltip-content="Download Image"
323+
size={18}
324+
/>
304325
</Button>
305326

306327
<Button
307328
isSelected={optionSelected === ShareOption.COPY}
308329
onClick={selectCopy}
309330
>
310-
<GoCopy size={18} />
331+
<GoCopy
332+
data-tooltip-id="go-copy"
333+
data-tooltip-content="Copy"
334+
size={18}
335+
/>
311336
</Button>
312337
</div>
313338
<button

0 commit comments

Comments
 (0)