A React component to show native social share widget and fallback share ui
Installation
Browser
npm install --save @timesinternet/times-socialshare
Browser
import SocialShare from '@timesinternet/times-socialshare';
export class MyComponent extends Component {
getShareDetail(){
return {
title: <title>,
url: <url>,
text: <description>
}
}
render(){
return(
<div>
<SocialShare sharedata={this.getShareDetail.bind(this)} headerText="Share"/>
</div>
)
}
}
export default MyComponent;