Skip to content

Commit

Permalink
build(deps): bump react-share from 5.1.2 to 5.2.0 (#754)
Browse files Browse the repository at this point in the history
Bumps [react-share](https://github.com/nygardk/react-share) from 5.1.2 to 5.2.0.
- [Release notes](https://github.com/nygardk/react-share/releases)
- [Changelog](https://github.com/nygardk/react-share/blob/master/CHANGELOG.md)
- [Commits](nygardk/react-share@v5.1.2...v5.2.0)

---
updated-dependencies:
- dependency-name: react-share
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Feb 4, 2025
1 parent d167baa commit 86e9c26
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 95 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"react-hubspot-form": "^1.3.7",
"react-i18next": "^15.4.0",
"react-icons": "^5.4.0",
"react-share": "^5.1.2",
"react-share": "^5.2.0",
"react-slick": "^0.30.3",
"react-switch": "^7.1.0",
"react-tabs": "^6.1.0",
Expand Down
56 changes: 33 additions & 23 deletions src/components/Share/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,72 +5,82 @@ import {
FacebookShareButton,
LinkedinShareButton,
RedditShareButton,
BlueskyShareButton,
} from "react-share"

import {
FaLinkedin,
FaFacebookSquare,
FaRedditSquare,
FaFacebook,
FaReddit,
} from "react-icons/fa";

import {
FaSquareXTwitter,
FaSquareEnvelope,
FaXTwitter,
FaBluesky,
FaEnvelope,
} from "react-icons/fa6";

const ShareButton = props => {
const { location, siteMetadata, post } = props
const twitter = [siteMetadata.social.twitter]
const url = siteMetadata.siteUrl + location.pathname

const iconStyle = {
paddingRight: "0.3em",
marginBottom: "0.2em",
}

return (
<div id="share-buttons">
<TwitterShareButton
aria-label="x"
aria-label="Share on X (Twitter)"
url={url}
className="mr-2"
title={post.title}
hashtags={post.tags}
related={twitter}
style={iconStyle}
>
<FaSquareXTwitter size={30} />
<FaXTwitter size={25} />
</TwitterShareButton>

<LinkedinShareButton
aria-label="linkedin"
aria-label="Share on Linkedin"
url={url}
className="mr-2"
title={post.title}
source={siteMetadata.siteUrl}
style={iconStyle}
>
<FaLinkedin size={30}/>
<FaLinkedin size={25} />
</LinkedinShareButton>

<FacebookShareButton aria-label="facebook" url={url} style={iconStyle}>
<FaFacebookSquare size={30} />
<FacebookShareButton
aria-label="Share on Facebook"
url={url}
className="mr-2"
>
<FaFacebook size={25} />
</FacebookShareButton>

<RedditShareButton
aria-label="reddit"
aria-label="Share on Reddit"
url={url}
className="mr-2"
title={post.title}
style={iconStyle}
>
<FaRedditSquare size={30} />
<FaReddit size={25} />
</RedditShareButton>

<BlueskyShareButton
aria-label="Share on Bluesky"
url={url}
className="mr-2"
title={post.title}
>
<FaBluesky size={25} />
</BlueskyShareButton>

<EmailShareButton
aria-label="email"
aria-label="Share via Email"
url={url}
className="mr-2"
subject={post.title}
style={iconStyle}
>
<FaSquareEnvelope size={30} />
<FaEnvelope size={25} />
</EmailShareButton>
</div>
)
Expand Down
Loading

0 comments on commit 86e9c26

Please sign in to comment.