File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ const GUIComponent = props => {
8484 onRequestCloseBackdropLibrary,
8585 onRequestCloseCostumeLibrary,
8686 onSeeCommunity,
87+ onShare,
8788 previewInfoVisible,
8889 targetIsStage,
8990 soundsTabVisible,
@@ -170,6 +171,7 @@ const GUIComponent = props => {
170171 onLogOut = { onLogOut }
171172 onOpenRegistration = { onOpenRegistration }
172173 onSeeCommunity = { onSeeCommunity }
174+ onShare = { onShare }
173175 onToggleLoginOpen = { onToggleLoginOpen }
174176 onUpdateProjectTitle = { onUpdateProjectTitle }
175177 />
@@ -323,6 +325,7 @@ GUIComponent.propTypes = {
323325 onRequestCloseBackdropLibrary : PropTypes . func ,
324326 onRequestCloseCostumeLibrary : PropTypes . func ,
325327 onSeeCommunity : PropTypes . func ,
328+ onShare : PropTypes . func ,
326329 onTabSelect : PropTypes . func ,
327330 onToggleLoginOpen : PropTypes . func ,
328331 onUpdateProjectTitle : PropTypes . func ,
Original file line number Diff line number Diff line change @@ -196,6 +196,18 @@ class MenuBar extends React.Component {
196196 id = "gui.menuBar.saveNow"
197197 />
198198 ) ;
199+ const shareButton = (
200+ < Button
201+ className = { classNames ( styles . shareButton ) }
202+ onClick = { this . props . onShare }
203+ >
204+ < FormattedMessage
205+ defaultMessage = "Share"
206+ description = "Label for project share button"
207+ id = "gui.menuBar.share"
208+ />
209+ </ Button >
210+ ) ;
199211 return (
200212 < Box
201213 className = { classNames ( styles . menuBar , {
@@ -392,15 +404,11 @@ class MenuBar extends React.Component {
392404 </ MenuBarItemTooltip >
393405 </ div >
394406 < div className = { classNames ( styles . menuBarItem ) } >
395- < MenuBarItemTooltip id = "share-button" >
396- < Button className = { classNames ( styles . shareButton ) } >
397- < FormattedMessage
398- defaultMessage = "Share"
399- description = "Label for project share button"
400- id = "gui.menuBar.share"
401- />
402- </ Button >
403- </ MenuBarItemTooltip >
407+ { this . props . onShare ? shareButton : (
408+ < MenuBarItemTooltip id = "share-button" >
409+ { shareButton }
410+ </ MenuBarItemTooltip >
411+ ) }
404412 </ div >
405413 < div className = { classNames ( styles . menuBarItem , styles . communityButtonWrapper ) } >
406414 { this . props . enableCommunity ?
You can’t perform that action at this time.
0 commit comments