From b89ef261d29e1dbbd2752ac4148f78d4f8f8a2ab Mon Sep 17 00:00:00 2001 From: svetlagasheva Date: Wed, 30 Jan 2019 14:48:31 +0200 Subject: [PATCH] ShareAddon renamed to ShareModal --- src/common/ShareAddon/index.js | 3 --- .../ShareAddon.js => ShareModal/ShareModal.js} | 10 +++++----- src/common/ShareModal/index.js | 3 +++ src/common/{ShareAddon => ShareModal}/styles.less | 14 +++++++------- src/common/index.js | 4 ++-- stories/index.stories.js | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 src/common/ShareAddon/index.js rename src/common/{ShareAddon/ShareAddon.js => ShareModal/ShareModal.js} (93%) create mode 100644 src/common/ShareModal/index.js rename src/common/{ShareAddon => ShareModal}/styles.less (92%) diff --git a/src/common/ShareAddon/index.js b/src/common/ShareAddon/index.js deleted file mode 100644 index f5ae618df..000000000 --- a/src/common/ShareAddon/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import ShareAddon from './ShareAddon'; - -export default ShareAddon; diff --git a/src/common/ShareAddon/ShareAddon.js b/src/common/ShareModal/ShareModal.js similarity index 93% rename from src/common/ShareAddon/ShareAddon.js rename to src/common/ShareModal/ShareModal.js index 889c1d8b5..f2168582a 100644 --- a/src/common/ShareAddon/ShareAddon.js +++ b/src/common/ShareModal/ShareModal.js @@ -19,14 +19,14 @@ const renderUrl = (copyToClipboard, url) => { ); } -const ShareAddon = (props) => { +const ShareModal = (props) => { const placeholderIconUrl = iconDataUrl({ icon: 'ic_x', fill: colors.surface }); const imageStyle = { backgroundImage: `url('${placeholderIconUrl}')` }; return ( -
+
@@ -49,7 +49,7 @@ const ShareAddon = (props) => { ); } -ShareAddon.propTypes = { +ShareModal.propTypes = { url: PropTypes.string.isRequired, closeModalDialog: PropTypes.func, shareInFacebook: PropTypes.func, @@ -57,8 +57,8 @@ ShareAddon.propTypes = { shareInGplus: PropTypes.func, copyToClipboard: PropTypes.func }; -ShareAddon.defaultProps = { +ShareModal.defaultProps = { url: '' }; -export default ShareAddon; \ No newline at end of file +export default ShareModal; \ No newline at end of file diff --git a/src/common/ShareModal/index.js b/src/common/ShareModal/index.js new file mode 100644 index 000000000..d57d639f4 --- /dev/null +++ b/src/common/ShareModal/index.js @@ -0,0 +1,3 @@ +import ShareModal from './ShareModal'; + +export default ShareModal; diff --git a/src/common/ShareAddon/styles.less b/src/common/ShareModal/styles.less similarity index 92% rename from src/common/ShareAddon/styles.less rename to src/common/ShareModal/styles.less index ae15605b6..9ccb11431 100644 --- a/src/common/ShareAddon/styles.less +++ b/src/common/ShareModal/styles.less @@ -1,8 +1,8 @@ -@share-addon-width: 380px; -@spacing: floor((@share-addon-width * 0.06)); +@share-modal-width: 380px; +@spacing: floor((@share-modal-width * 0.06)); -.share-addon { - width: @share-addon-width; +.share-modal { + width: @share-modal-width; padding: ceil((@spacing * 0.5)); .x-icon { @@ -18,8 +18,8 @@ } .facebook-button, .twitter-button, .gplus-button { - width: ceil((@share-addon-width * 0.26)); - height: floor((@share-addon-width * 0.09)); + width: ceil((@share-modal-width * 0.26)); + height: floor((@share-modal-width * 0.09)); .facebook-icon, .twitter-icon, .gplus-icon { width: ceil((@spacing * 0.6)); @@ -54,7 +54,7 @@ } } -.share-addon { +.share-modal { color: var(--color-surfacelighter); background-color: var(--color-surfacelighter); diff --git a/src/common/index.js b/src/common/index.js index 9487eaa0c..d76f0aa03 100644 --- a/src/common/index.js +++ b/src/common/index.js @@ -6,7 +6,7 @@ import MetadataItem from './MetadataItem'; import Router from './Router'; import LibraryItemList from './LibraryItemList'; import MetaItem from './MetaItem'; -import ShareAddon from './ShareAddon'; +import ShareModal from './ShareModal'; import UserPanel from './UserPanel'; import Slider from './Slider'; @@ -19,7 +19,7 @@ export { Router, LibraryItemList, MetaItem, - ShareAddon, + ShareModal, UserPanel, Slider }; diff --git a/stories/index.stories.js b/stories/index.stories.js index 2401ba71f..63fff7cbe 100644 --- a/stories/index.stories.js +++ b/stories/index.stories.js @@ -1,6 +1,6 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; -import { Checkbox, LibraryItemList, MetaItem, ShareAddon, UserPanel } from 'stremio-common'; +import { Checkbox, LibraryItemList, MetaItem, ShareModal, UserPanel } from 'stremio-common'; import Addon from '../src/routes/Addons/Addon'; import Stream from '../src/routes/Detail/StreamsList/Stream'; import Video from '../src/routes/Detail/VideosList/Video'; @@ -171,10 +171,10 @@ storiesOf('MetaItem', module) )); -storiesOf('ShareAddon', module) - .add('share addon', () => ( +storiesOf('ShareModal', module) + .add('share modal', () => (
- +
));