- Chore: upgraded build deps
- Fix: Support React 18 in
peerDependencies
- Fix: Support React 17 in
peerDependencies
(#379) - Fix: Updated Telegram link for shares custom URLs (#377)
- Fix: Updated Reddit logo background colour (#366)
- Added:
HatenaShareButton
andHatenaShareCount
- Fix: added internal
assert
utility to get rid of Node.jsassert
dependency (MINOR BREAKING CHANGE: the error thrown is slightly different)
- Added:
FacebookMessengerShareButton
docs are now included in the readme - Fix: Prevent
VKShareCount
from colliding with an existingwindow.VK
object - Fix: Default separator in
ViberShareButton
is now' '
- Fix:
WhatsappIcon
green color to match with WhatsApp brand - Fix: Allow
ShareButton
beforeOnClick
to returnvoid
- Fix: Guard against unexpected behaviour with
OKShareCount
for the returned index parameter by adding a sensible fallback
- Fix:
TwitterShareButton
won't have hashtags as empty string (#284, #293) - Fix:
OKShareCount
now supports multiple different share counts per page (#289) - Fix: share buttons won't pass link options as props (#286)
- Fix:
EmailShareButton
now has defaultseparator
correctly as `` #287) - Fix:
WhatsappShareButton
now has defaultseparator
correctly as `` - Fix:
TumblrShareButton
now has defaultposttype
correctly aslink
- Feature:
TwitterShareButton
now supports "related" array (#281)
- React 16.3.0 or newer is now required
- Refactored to TypeScript, type definitions are now included
- Added:
FacebookMessengerShareButton
andFacebookMessengerShareCount
- Added:
WeiboIcon
- Fixed:
VKShareButton
- Fixed:
LinkedinShareButton
- Fixed:
MailruShareButton
- Fixed:
TumblrShareCount
- Fixed:
FacebookShareCount
- Breaking changes:
- default
className
s have been changed - all
{ ...rest }
props are spread to the root element for share buttons and share counts - share counts are now rendered in
span
element instead ofdiv
- icons have
svg
as root element instead ofdiv
- icon props were renamed:
iconBgStyle
->bgStyle
,logoFillColor
->iconFillColor
- default
- Forward
ref
on to the share buttons - use
componentDidUpdate
instead ofcomponentWillUpdate
- Added
<PocketShareButton>
- Added
<InstapaperShareButton>
- Added
borderRadius
prop for icons - A default
aria-label
is generated for the share buttons. It is based on the network name. UseadditionalProps
to override. - Removed support for Google+.
- Removed support for
<LinkedInShareCount/>
. LinkedIn no longer provides an API to fetch share counts. - Removed
title
anddescription
from<LinkedInShareButtons/>
. - Fix:
<EmailShareButton/>
includesbody
beforeurl
. - Fix:
<EmailShareButton/>
and<ViberShareButton/>
allow customization ofseparator
. - Fix:
<WeiboShareButton/>
no longer requiresimage
prop - Fix:
<WeiboShareButton/>
includes url correctly when shared - Fix:
<WeiboShareButton/>
and<OKShareButton/>
open in screen center to prevent window from jumping after opening - Thanks @finppp, @madkoding, @andrewl913, @jwrubel, @sinchang and @sergioribeiro!
- Added
<LineShareButton />
and<WeiboShareButton />
tabIndex
prop can now also be a number
- Added
<WorkplaceShareButton />
(Facebook Workplace)
- Added
<ViberShareButton />
- Support
name
prop in share buttons - Fix minor accessibility issue (#156)
- Added support for
webpack 4
tree shaking withsideEffects: false
-flag inpackage.json
- Fix: use
https
for TumblrShareCount - Fix: use
url
as the default email body (instead ofsubject
) - Fix: invoke
beforeOnClick
also for EmailShareButton
- Major project refactoring (thanks @aautio!)
- CommonJS modules are buit to
./lib
, es-modules are built to./es
- Share buttons, share counts and icons are now separately importable and support tree-shaking
- Demo is now found at http://nygardk.github.io/react-share/
- Minor fix to how
logoFillColor
is passed to the icon path
- Removed
platform
dependency and replace <=IE10 check with a utility function (thanks @aautio!)
- Whatsapp share button: fixed displaying "undefined" when title was not provided (fixes #84, thanks @aautio!)
- Added LiveJournal and Mail.Ru sharebuttons (thanks @pvpshoot!)
- Added
<TumblrShareButton />
and<TumblrShareCount />
(thanks @ArtBIT!) - Added
additionalProps
to share buttons to make it possible to pass any additional props (likearia-
attributes) - It is now possible to override
role
(default='button') andtabIndex
(default='0') props
- Allow React
v16.x.x
as peer dependency. - Added
<EmailShareButton />
. - Added
onShareWindowClose
share button prop (#91).
- Deprecated
title
,description
andpicture
props for FacebookShareButton (because of Facebook API change). New prop:quote
.
- Use new WhatsApp API (thanks @renchap!).
- A11y update: handle Enter-keypress when share button is on focus.
- Minor accessibility update.
- Added Reddit share button and count (thanks @watbe!).
beforeOnClick
no longer has to return Promise
- More permissive dependency versions.
- Minor icon component fix: use
prop-types
lib instead ofReact.propTypes
and useReact.Component
instead ofReact.createClass
. Suppresses warnings caused by upgrading to React v.>=15.5.0
(thanks @yurick-flama).
- Added share button and count for Odnoklassniki.ru (thanks @R0nd!).
- Replaced
https://facebook.com/sharer.php
withhttps://www.facebook.com/sharer/sharer.php
- Added VKShareCount
- Added Whatsapp and Telegram share buttons
- Added
image
prop to VK share link - Added missing
picture
prop to README.md for FacebookShareButton
- Added
beforeOnClick
option for share buttons - Added
hashtag
option for Facebook share button
- Added
title
anddescription
to VK and Linkedin share links (@VorontsovMaxim) - Fixed Firefox bug with loading SVGs with CSP enabled (@OttoRobotto)
- New end point for fetching Facebook share count.
- Added
windowWidth
andwindowHeight
props to share buttons to control opened window dimensions
- Added
title
anddescription
props for FacebookShareButton.title
was not working correctly previously.
- Fixed propType warnings that were caused by updating to React v. 15.2.0
- Share count will now be updated if url prop is changed
- Error callback with Facebook share counts is now correctly called
- added disabled and disabledStyle props to share buttons
- added iconBgStyle and logoFillColor to icon styles
- Inline style
display: 'inline-block'
is no longer added to icons. If you are upgrading from an older version, be sure to add the style yourself if needed.
- feature: added sharing support for VK
- internal changes for preparing version 2, assertion message changes
- minor breaking change: Google Plus button now has class
SocialMediaShareButton--googlePlus
instead ofSocialMediaShareButton--google-plus
- Updated to support React v. 15.x.x
- Bugfix: className-prop was not propagating correctly in share-buttons.
- Removed Bluebird from dependencies: no need for Promises. The library has a much smaller footprint now.
- TwitterShareCount removed: Since 20th of November Twitter no longer supports open count API. The service was shut down and there is currently no way to fetch the share count. Thus, TwitterShareCount was removed in version 1.3.0.
- use jsonp instead of fetch API when fetching Facebook share count
- use XHR instead of fetch API when fetching Google Plus share count
- fixed problem with window.open on <=IE9