mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-16 07:26:48 +00:00
ShareAddon renamed to ShareModal
This commit is contained in:
parent
a61697ce38
commit
b89ef261d2
6 changed files with 21 additions and 21 deletions
|
|
@ -1,3 +0,0 @@
|
|||
import ShareAddon from './ShareAddon';
|
||||
|
||||
export default ShareAddon;
|
||||
|
|
@ -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 (
|
||||
<div className={styles['share-addon']}>
|
||||
<div className={styles['share-modal']}>
|
||||
<div className={styles['x-container']}>
|
||||
<div onClick={props.closeModalDialog} style={imageStyle} className={styles['x-icon']} />
|
||||
</div>
|
||||
|
|
@ -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;
|
||||
export default ShareModal;
|
||||
3
src/common/ShareModal/index.js
Normal file
3
src/common/ShareModal/index.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import ShareModal from './ShareModal';
|
||||
|
||||
export default ShareModal;
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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', () => (
|
||||
<div style={storyStyle} className={appStyles['app']}>
|
||||
<ShareAddon url={'....'} />
|
||||
<ShareModal url={'....'} />
|
||||
</div>
|
||||
));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue