Merge pull request #4039 from rschamp/on-click-logo
Add onClick prop for the logo
This commit is contained in:
5 files changed
+30
-8
No files matched your search
@@ -96,6 +96,7 @@ const GUIComponent = props => {
|
||||
onActivateCostumesTab,
|
||||
onActivateSoundsTab,
|
||||
onActivateTab,
|
||||
onClickLogo,
|
||||
onExtensionButtonClick,
|
||||
onRequestCloseBackdropLibrary,
|
||||
onRequestCloseCostumeLibrary,
|
||||
@@ -205,6 +206,7 @@ const GUIComponent = props => {
|
||||
renderLogin={renderLogin}
|
||||
showComingSoon={showComingSoon}
|
||||
onClickAccountNav={onClickAccountNav}
|
||||
onClickLogo={onClickLogo}
|
||||
onCloseAccountNav={onCloseAccountNav}
|
||||
onLogOut={onLogOut}
|
||||
onOpenRegistration={onOpenRegistration}
|
||||
@@ -370,6 +372,7 @@ GUIComponent.propTypes = {
|
||||
onActivateSoundsTab: PropTypes.func,
|
||||
onActivateTab: PropTypes.func,
|
||||
onClickAccountNav: PropTypes.func,
|
||||
onClickLogo: PropTypes.func,
|
||||
onCloseAccountNav: PropTypes.func,
|
||||
onExtensionButtonClick: PropTypes.func,
|
||||
onLogOut: PropTypes.func,
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.scratch-logo.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.language-icon {
|
||||
height: 1.5rem;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -298,14 +298,15 @@ class MenuBar extends React.Component {
|
||||
<div className={styles.mainMenu}>
|
||||
<div className={styles.fileGroup}>
|
||||
<div className={classNames(styles.menuBarItem)}>
|
||||
<a href="https://scratch.mit.edu">
|
||||
<img
|
||||
alt="Scratch"
|
||||
className={styles.scratchLogo}
|
||||
draggable={false}
|
||||
src={scratchLogo}
|
||||
/>
|
||||
</a>
|
||||
<img
|
||||
alt="Scratch"
|
||||
className={classNames(styles.scratchLogo, {
|
||||
[styles.clickable]: typeof this.props.onClickLogo !== 'undefined'
|
||||
})}
|
||||
draggable={false}
|
||||
src={scratchLogo}
|
||||
onClick={this.props.onClickLogo}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className={classNames(styles.menuBarItem, styles.hoverable, styles.languageMenu)}
|
||||
@@ -715,6 +716,7 @@ MenuBar.propTypes = {
|
||||
onClickFile: PropTypes.func,
|
||||
onClickLanguage: PropTypes.func,
|
||||
onClickLogin: PropTypes.func,
|
||||
onClickLogo: PropTypes.func,
|
||||
onClickNew: PropTypes.func,
|
||||
onClickRemix: PropTypes.func,
|
||||
onClickSave: PropTypes.func,
|
||||
|
||||
Reference in new issue
Block a user