diff --git a/src/common/ShareModal/ShareModal.js b/src/common/ShareModal/ShareModal.js index 22ffad397..74a7c740c 100644 --- a/src/common/ShareModal/ShareModal.js +++ b/src/common/ShareModal/ShareModal.js @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import classnames from 'classnames'; import { Input } from 'stremio-common'; import Icon, { dataUrl as iconDataUrl } from 'stremio-icons/dom'; import colors from 'stremio-colors'; @@ -7,7 +8,7 @@ import styles from './styles'; const renderInput = ({ className, href, icon, label }, url) => { return ( - + {label} ); @@ -21,8 +22,9 @@ const renderUrl = (url) => { return (
-
- Copy +
+ +
Copy
); @@ -42,14 +44,13 @@ const ShareModal = (props) => { return (
-
+
Share
{renderInput({ className: 'facebook-button', href: 'https://www.facebook.com/sharer/sharer.php?u=', icon: 'ic_facebook', label: 'FACEBOOK' })} {renderInput({ className: 'twitter-button', href: 'https://twitter.com/home?status=', icon: 'ic_twitter', label: 'TWITTER' })} - {renderInput({ className: 'gplus-button', href: 'https://plus.google.com/share?url=', icon: 'ic_gplus', label: 'GOOGLE+' })}
{renderUrl(props.url)}
diff --git a/src/common/ShareModal/styles.less b/src/common/ShareModal/styles.less index bf36ab355..b6f2250f5 100644 --- a/src/common/ShareModal/styles.less +++ b/src/common/ShareModal/styles.less @@ -34,12 +34,13 @@ .buttons { padding: var(--spacing) 0; display: flex; - justify-content: space-between; + flex-direction: row; - .facebook-button, .twitter-button, .gplus-button { - width: calc(var(--share-modal-width) * 0.26); + .button { + flex: 1; height: calc(var(--share-modal-width) * 0.09); display: flex; + flex-direction: row; align-items: center; justify-content: center; font-size: 0.8em; @@ -52,6 +53,14 @@ height: calc(var(--spacing) * 0.7); fill: var(--color-surfacelighter); } + + &:focus, &:hover { + filter: brightness(1.2); + } + + &:not(:last-child) { + margin-right: 1em; + } } .facebook-button { @@ -61,16 +70,12 @@ .twitter-button { background-color: var(--color-secondarylighter); } - - .gplus-button { - background-color: var(--color-signal2); - } } .url-container { display: flex; - border-radius: 4px; - border: 1px solid var(--color-surface); + flex-direction: row; + border: calc(var(--focusable-border-size) * 0.5) solid var(--color-surface); .url { padding: calc(var(--spacing) * 0.5); @@ -78,27 +83,31 @@ font-size: 0.9em; text-align: center; text-overflow: ellipsis; - border-radius: 4px; color: var(--color-surfacedark); - outline: none; } - .copy-label { + .copy-button { padding: calc(var(--spacing) * 0.5); width: 25%; display: flex; + flex-direction: row; justify-content: center; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - color: var(--color-surfacedark); - background-color: var(--color-surfacelight); + background-color: var(--color-surface); cursor: pointer; - .copy-icon { + .icon { margin-right: calc(var(--spacing) * 0.3); width: calc(var(--spacing) * 0.7); height: calc(var(--spacing) * 0.7); - fill: var(--color-backgrounddarker40); + fill: var(--color-surfacedarker); + } + + .label { + color: var(--color-surfacedarker); + } + + &:hover { + background-color: var(--color-surface60); } } }