Skip to content

Commit

Permalink
Tooltip Added for all icons in Share Card (#152)
Browse files Browse the repository at this point in the history
* Tooltip Added for all icons in Share Card

* Spelling Bug Fixed
  • Loading branch information
RounakJoshi09 authored Aug 8, 2024
1 parent 4bca20e commit 9656fa5
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions src/components/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { GoCopy, GoDownload, GoX } from 'react-icons/go';
import { track } from '@/constants/events';
import toast from 'react-hot-toast';
import { logException } from '@/utils/logger';
import { Tooltip } from 'react-tooltip';

type ShareButtonProps = {
imageUrl?: string;
Expand Down Expand Up @@ -279,35 +280,59 @@ const ShareMenu2 = ({
isSelected={optionSelected === ShareOption.COPY}
onClick={selectCopy}
>
<GoCopy size={20} />
<Tooltip id="go-copy" />
<GoCopy
data-tooltip-id="go-copy"
data-tooltip-content="Copy"
size={20}
/>
</Button>

<Button
isSelected={optionSelected === ShareOption.TWEET}
onClick={selectTweet}
>
<CiTwitter size={20} />
<Tooltip id="ci-twitter" />
<CiTwitter
data-tooltip-id="ci-twitter"
data-tooltip-content="Share on X"
size={20}
/>
</Button>

<Button
isSelected={optionSelected === ShareOption.LINKEDIN}
onClick={selectLinkedIn}
>
<CiLinkedin size={18} />
<Tooltip id="ci-linkedIn" />
<CiLinkedin
data-tooltip-id="ci-linkedIn"
data-tooltip-content="Share on LinkedIn"
size={18}
/>
</Button>

<Button
isSelected={optionSelected === ShareOption.DOWNLOAD}
onClick={selectDownload}
>
<GoDownload size={18} />
<Tooltip id="go-download" />
<GoDownload
data-tooltip-id="go-download"
data-tooltip-content="Download Image"
size={18}
/>
</Button>

<Button
isSelected={optionSelected === ShareOption.COPY}
onClick={selectCopy}
>
<GoCopy size={18} />
<GoCopy
data-tooltip-id="go-copy"
data-tooltip-content="Copy"
size={18}
/>
</Button>
</div>
<button
Expand Down

0 comments on commit 9656fa5

Please sign in to comment.