import React, { PropTypes, Component } from 'react'; class SocialShare extends Component { constructor() { super(); this.toggleView = this.toggleView.bind(this); this.state = { showShare: false } } viaTwitter() { return !!Settings.get('twitterAccount') ? 'via='+Settings.get('twitterAccount') : ''; } toggleView() { this.setState({ showShare: !this.state.showShare }); return; } insertIcon(name) { return {__html: Telescope.utils.getIcon(name)}; } render() { let shareDisplay = this.state.showShare ? 'active' : 'hidden'; return (
) } } SocialShare.propTypes = { url: React.PropTypes.string.isRequired, title: React.PropTypes.string.isRequired, } module.exports = SocialShare;