@berlitz/social-share
v2.2.0
Published
SocialShare component for the Max Design System
Downloads
5,004
Readme
Component Name
Installation
yarn add @berlitz/social-share
Props
| Argument | Type | Required | Default | Description | | ---------------- | ------ | -------- | ------------ | --------------------------------------- | | currentUrl | string | Yes | | | | callToActionText | string | No | 'Share This' | | | links | array | No | defaultLinks | Array of social media platforms and url |
Example links
[
{
"platform": "Facebook",
"url": "https://www.facebook.com/sharer/sharer.php?u="
},
{
"platform": "Weibo",
"url": "https://service.weibo.com/share/share.php?url="
}
]
Usage
import SocialShare from '@berlitz/social-share'
const MyApp = () => (
<SocialShare
currentUrl={`https://www.berlitz.com${url}`}
callToActionText={'call to action text here'}
links={socialShareLinks}
/>
)