generated from hatchways/express-starter
-
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.
Merge pull request #17 from hatchways/create-ui-new-game_tony_13
Create UI for New Game
- Loading branch information
Showing
6 changed files
with
123 additions
and
1 deletion.
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
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,30 @@ | ||
import React from "react"; | ||
import Grid from "@material-ui/core/Grid"; | ||
import Typography from "@material-ui/core/Typography"; | ||
|
||
import "../common/common.css"; | ||
|
||
function Header(props) { | ||
return ( | ||
<> | ||
<Grid | ||
container | ||
className="header" | ||
direction="column" | ||
justify="center" | ||
alignItems="center" | ||
> | ||
<Grid item> | ||
<Typography className="title" align="center" variant="h4"> | ||
{props.title} | ||
</Typography> | ||
</Grid> | ||
<Grid item> | ||
<div className="underscore" /> | ||
</Grid> | ||
</Grid> | ||
</> | ||
); | ||
} | ||
|
||
export default Header; |
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,9 @@ | ||
.header .title { | ||
padding: 15px; | ||
} | ||
|
||
.header .underscore { | ||
height: 3px; | ||
width: 75px; | ||
background-color: limegreen; | ||
} |
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,12 @@ | ||
.header { | ||
margin-bottom: 15px; | ||
} | ||
|
||
.panel { | ||
padding: 25px 40px; | ||
min-width: 350px; | ||
} | ||
|
||
.panel .grid-input { | ||
margin-right: 8px; | ||
} |
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,68 @@ | ||
import React from "react"; | ||
import Button from "@material-ui/core/Button"; | ||
import Container from "@material-ui/core/Container"; | ||
import Grid from "@material-ui/core/Grid"; | ||
import Input from "@material-ui/core/Input"; | ||
import Typography from "@material-ui/core/Typography"; | ||
|
||
import Header from "../common/Header"; | ||
import "./CreateGame.css"; | ||
|
||
function CreateGame() { | ||
return ( | ||
<Container> | ||
<Grid container direction="column" justify="center" alignItems="center"> | ||
<Grid item className="header"> | ||
<Header title="Welcome" /> | ||
</Grid> | ||
<Grid item> | ||
<Grid container justify="center" alignItems="center"> | ||
<Grid item className="panel"> | ||
<Grid container direction="column"> | ||
<Grid item> | ||
<Grid container direction="column"> | ||
<Grid item> | ||
<Typography variant="h6" gutterBottom> | ||
Join a Game: | ||
</Typography> | ||
</Grid> | ||
<Grid item> | ||
<Grid container alignItems="center"> | ||
<Grid item className="grid-input"> | ||
<Input placeholder="Enter Game ID" /> | ||
</Grid> | ||
<Grid item> | ||
<Button variant="contained" color="primary"> | ||
Join | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
<Grid item className="panel"> | ||
<Grid container direction="column"> | ||
<Grid item> | ||
<Grid container direction="column"> | ||
<Grid item> | ||
<Typography variant="h6" gutterBottom> | ||
New Game: | ||
</Typography> | ||
</Grid> | ||
<Grid item> | ||
<Button variant="contained">Create</Button> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Container> | ||
); | ||
} | ||
|
||
export default CreateGame; |