import React from 'react'; import PropTypes from 'prop-types'; import Icon, { dataUrl as iconDataUrl } from 'stremio-icons/dom'; import colors from 'stremio-colors'; import styles from './styles'; const renderUrl = (copyToClipboard, url) => { if (url.length === 0) { return null; } return (
Copy
); } const ShareModal = (props) => { const placeholderIconUrl = iconDataUrl({ icon: 'ic_x', fill: colors.surface }); const imageStyle = { backgroundImage: `url('${placeholderIconUrl}')` }; return (
Share Add-on
FACEBOOK
TWITTER
GOOGLE+
{renderUrl(props.copyToClipboard, props.url)}
); } ShareModal.propTypes = { url: PropTypes.string.isRequired, closeModalDialog: PropTypes.func, shareInFacebook: PropTypes.func, shareInTwitter: PropTypes.func, shareInGplus: PropTypes.func, copyToClipboard: PropTypes.func }; ShareModal.defaultProps = { url: '' }; export default ShareModal;