-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* created a presentational component to house Game and UltimateGame
* tweaked css a little
- Loading branch information
Showing
7 changed files
with
54 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import Game from './Game'; | ||
import Title from './Title'; | ||
import UltimateGame from './UltimateGame'; | ||
|
||
export default function App() { | ||
return ( | ||
<div> | ||
<Title name="React" /> | ||
<div className="table"> | ||
<div className="table-cell"> | ||
<UltimateGame /> | ||
</div> | ||
<div className="table-cell table-large-padding"> | ||
<Game /> | ||
</div> | ||
</div> | ||
</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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export default function Title({ name }) { | ||
return <h1>Hello {name}</h1>; | ||
return <h1>Tic-tac-toe in {name}!</h1>; | ||
} |
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
import React from 'react'; | ||
import ReactDom from 'react-dom'; | ||
import Game from './components/Game'; | ||
import UltimateGame from './components/UltimateGame'; | ||
import App from './components/App'; | ||
import './index.css'; | ||
|
||
const ultimateGameApp = document.createElement('div'); | ||
const normalGameApp = document.createElement('div'); | ||
document.body.appendChild(ultimateGameApp); | ||
document.body.appendChild(normalGameApp); | ||
ReactDom.render(<UltimateGame />, ultimateGameApp); | ||
ReactDom.render(<Game />, normalGameApp); | ||
const app = document.createElement('div'); | ||
document.body.appendChild(app); | ||
ReactDom.render(<App />, app); |