-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent images from being dragged. Add HelpModal with placeholder content. Make icons for ConnectionConfigButton. Extract ConnectionConfigButton to TopbarButton, then add another one that opens the HelpModal.
- Loading branch information
Showing
15 changed files
with
189 additions
and
40 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.TopbarButton { | ||
height: 100%; | ||
} | ||
.TopbarButton button { | ||
background-color: transparent; | ||
border: none; | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
.TopbarButton img { | ||
height: 25px; | ||
border: 3px solid lightgray; | ||
border-radius: 6px; | ||
pointer-events: none; | ||
} | ||
.TopbarButton button:active img { | ||
border-color: gray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import './TopbarButton.css'; | ||
|
||
/** | ||
* Image button component in the Topbar that opens a modal. | ||
* @param props - props | ||
* @param props.onModalOpen - click handler for the button that opens the ConnectionConfigModal | ||
* @param props.src - source of the image | ||
* @param props.alt - string to use as the image alt text and button hover text | ||
*/ | ||
export default function TopbarButton({ | ||
onModalOpen, | ||
src, | ||
alt, | ||
}: { | ||
onModalOpen: () => void; | ||
src: string; | ||
alt: string; | ||
}) { | ||
return ( | ||
<div className="TopbarButton"> | ||
<button type="button" onClick={onModalOpen} title={alt}> | ||
<img src={src} alt={alt} /> | ||
</button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Modal from './Modal'; | ||
|
||
/** | ||
* Modal component displaying help for Dawn and the robot API. | ||
* @param props - props | ||
* @param props.onClose - handler called when the modal is closed by any means | ||
* @param props.isActive - whether to display the modal | ||
*/ | ||
export default function GamepadInfoModal({ | ||
onClose, | ||
isActive, | ||
}: { | ||
onClose: () => void; | ||
isActive: boolean; | ||
}) { | ||
return ( | ||
<Modal modalTitle="Help" onClose={onClose} isActive={isActive}> | ||
This is a very helpful message. So helpful, in fact, that it's too | ||
helpful to even write here. Its helpfulness would blind your eyes with its | ||
brilliance. | ||
</Modal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters