-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sidebar): Add about PlayOS menu option
- Loading branch information
1 parent
ecc73e3
commit 1db31e9
Showing
5 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
src/js/components/molecules/SideNavigation/AboutDialog.scss
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,20 @@ | ||
.title { | ||
padding-bottom: 0 !important; | ||
|
||
h2 { | ||
display: flex; | ||
|
||
span { | ||
padding-left: 20px; | ||
} | ||
} | ||
} | ||
|
||
.content { | ||
padding-top: 0 !important; | ||
} | ||
|
||
.version { | ||
text-align: right; | ||
margin-bottom: 30px !important; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/js/components/molecules/SideNavigation/AboutDialog.tsx
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,37 @@ | ||
import * as React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import Dialog from '@material-ui/core/Dialog'; | ||
import DialogTitle from '@material-ui/core/DialogTitle'; | ||
import DialogContent from '@material-ui/core/DialogContent'; | ||
import DialogContentText from '@material-ui/core/DialogContentText'; | ||
import DialogActions from '@material-ui/core/DialogActions'; | ||
import Typography from '@material-ui/core/Typography'; | ||
const packageJson = require('../../../../../package.json'); | ||
const styles = require('./AboutDialog.scss'); | ||
|
||
interface Props { | ||
open: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
|
||
export default function AboutDialog(props: Props) { | ||
return ( | ||
<Dialog open={props.open} onClose={() => props.onClose()}> | ||
<DialogTitle className={styles.title}> | ||
<img src="res/img/PlayOSLogoSide_black.svg" alt="PlayOS" /> | ||
<span>Matterhorn</span> | ||
</DialogTitle> | ||
<DialogContent className={styles.content}> | ||
<DialogContentText> | ||
<Typography variant="body2" className={styles.version}>v{packageJson.version}</Typography> | ||
Licensed under GPL v3 <br /> | ||
Code available at GitHub | ||
</DialogContentText> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={() => props.onClose()}>Ok</Button> | ||
</DialogActions> | ||
</Dialog> | ||
); | ||
} |
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