Skip to content
Snippets Groups Projects
Commit ed3eb916 authored by Ray Schamp's avatar Ray Schamp
Browse files

Add onShare prop to enable the share button

parent ca51b637
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,7 @@ const GUIComponent = props => {
onRequestCloseBackdropLibrary,
onRequestCloseCostumeLibrary,
onSeeCommunity,
onShare,
previewInfoVisible,
targetIsStage,
soundsTabVisible,
......@@ -170,6 +171,7 @@ const GUIComponent = props => {
onLogOut={onLogOut}
onOpenRegistration={onOpenRegistration}
onSeeCommunity={onSeeCommunity}
onShare={onShare}
onToggleLoginOpen={onToggleLoginOpen}
onUpdateProjectTitle={onUpdateProjectTitle}
/>
......@@ -323,6 +325,7 @@ GUIComponent.propTypes = {
onRequestCloseBackdropLibrary: PropTypes.func,
onRequestCloseCostumeLibrary: PropTypes.func,
onSeeCommunity: PropTypes.func,
onShare: PropTypes.func,
onTabSelect: PropTypes.func,
onToggleLoginOpen: PropTypes.func,
onUpdateProjectTitle: PropTypes.func,
......
......@@ -196,6 +196,18 @@ class MenuBar extends React.Component {
id="gui.menuBar.saveNow"
/>
);
const shareButton = (
<Button
className={classNames(styles.shareButton)}
onClick={this.props.onShare}
>
<FormattedMessage
defaultMessage="Share"
description="Label for project share button"
id="gui.menuBar.share"
/>
</Button>
);
return (
<Box
className={classNames(styles.menuBar, {
......@@ -392,15 +404,11 @@ class MenuBar extends React.Component {
</MenuBarItemTooltip>
</div>
<div className={classNames(styles.menuBarItem)}>
<MenuBarItemTooltip id="share-button">
<Button className={classNames(styles.shareButton)}>
<FormattedMessage
defaultMessage="Share"
description="Label for project share button"
id="gui.menuBar.share"
/>
</Button>
</MenuBarItemTooltip>
{this.props.onShare ? shareButton : (
<MenuBarItemTooltip id="share-button">
{shareButton}
</MenuBarItemTooltip>
)}
</div>
<div className={classNames(styles.menuBarItem, styles.communityButtonWrapper)}>
{this.props.enableCommunity ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment