Commit 9ce79dea authored by Paul Kaplan's avatar Paul Kaplan

Control visibility externally and fix css

parent 21a7f122
...@@ -87,10 +87,9 @@ const PreviewPresentation = ({ ...@@ -87,10 +87,9 @@ const PreviewPresentation = ({
const shareDate = ((projectInfo.history && projectInfo.history.shared)) ? projectInfo.history.shared : ''; const shareDate = ((projectInfo.history && projectInfo.history.shared)) ? projectInfo.history.shared : '';
return ( return (
<div className="preview"> <div className="preview">
<ShareBanner {!isShared && (
shared={isShared} <ShareBanner onShare={onShare} />
onShare={onShare} )}
/>
{ projectInfo && projectInfo.author && projectInfo.author.id && ( { projectInfo && projectInfo.author && projectInfo.author.id && (
<Formsy onKeyPress={onKeyPress}> <Formsy onKeyPress={onKeyPress}>
<div className="inner"> <div className="inner">
......
...@@ -6,30 +6,24 @@ const Button = require('../../components/forms/button.jsx'); ...@@ -6,30 +6,24 @@ const Button = require('../../components/forms/button.jsx');
require('./share-banner.scss'); require('./share-banner.scss');
const ShareBanner = props => { const ShareBanner = ({onShare}) => (
if (props.shared) return null; <div className="share-banner-outer">
return ( <FlexRow className="inner share-banner">
<div className="shareBanner"> <span className="share-text">
<div className="inner"> <FormattedMessage id="preview.share.notShared" />
<FlexRow className="preview-row"> </span>
<span className="share-text"> <Button
<FormattedMessage id="preview.share.notShared" /> className="button share-button"
</span> onClick={onShare}
<Button >
className="button share-button" <FormattedMessage id="preview.share.shareButton" />
onClick={props.onShare} </Button>
> </FlexRow>
<FormattedMessage id="preview.share.shareButton" /> </div>
</Button> );
</FlexRow>
</div>
</div>
);
};
ShareBanner.propTypes = { ShareBanner.propTypes = {
onShare: PropTypes.func, onShare: PropTypes.func
shared: PropTypes.bool.isRequired
}; };
module.exports = ShareBanner; module.exports = ShareBanner;
...@@ -2,19 +2,23 @@ ...@@ -2,19 +2,23 @@
$navigation-height: 50px; $navigation-height: 50px;
.shareBanner { .share-banner-outer {
background-color: $ui-orange-25percent; background-color: $ui-orange-25percent;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
color: $ui-orange; color: $ui-orange;
} }
.share-banner {
align-items: center;
justify-content: space-between;
}
.share-button { .share-button {
margin-top: 0;
background-color: $ui-orange; background-color: $ui-orange;
font-size: .875rem; font-size: .875rem;
font-weight: normal; font-weight: normal;
&:before { &:before {
display: inline-block; display: inline-block;
margin-right: .5rem; margin-right: .5rem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment