generated from jlumbroso/react-ts-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.
- Loading branch information
Showing
6 changed files
with
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React, { useState } from 'react' | ||
import { boardDefault } from "../helpers" | ||
|
||
import Letter from "./Letter" | ||
|
||
type Props = {} | ||
|
||
function Board({}: Props) { | ||
return ( | ||
<div className="board"> | ||
{" "} | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={0}/> | ||
<Letter letterPos={1} attemptVal={0}/> | ||
<Letter letterPos={2} attemptVal={0}/> | ||
<Letter letterPos={3} attemptVal={0}/> | ||
<Letter letterPos={4} attemptVal={0}/> | ||
<Letter letterPos={5} attemptVal={0}/> | ||
</div> | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={1}/> | ||
<Letter letterPos={1} attemptVal={1}/> | ||
<Letter letterPos={2} attemptVal={1}/> | ||
<Letter letterPos={3} attemptVal={1}/> | ||
<Letter letterPos={4} attemptVal={1}/> | ||
<Letter letterPos={5} attemptVal={1}/> | ||
</div> | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={2}/> | ||
<Letter letterPos={1} attemptVal={2}/> | ||
<Letter letterPos={2} attemptVal={2}/> | ||
<Letter letterPos={3} attemptVal={2}/> | ||
<Letter letterPos={4} attemptVal={2}/> | ||
<Letter letterPos={5} attemptVal={2}/> | ||
</div> | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={3}/> | ||
<Letter letterPos={1} attemptVal={3}/> | ||
<Letter letterPos={2} attemptVal={3}/> | ||
<Letter letterPos={3} attemptVal={3}/> | ||
<Letter letterPos={4} attemptVal={3}/> | ||
<Letter letterPos={5} attemptVal={3}/> | ||
</div> | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={4}/> | ||
<Letter letterPos={1} attemptVal={4}/> | ||
<Letter letterPos={2} attemptVal={4}/> | ||
<Letter letterPos={3} attemptVal={4}/> | ||
<Letter letterPos={4} attemptVal={4}/> | ||
<Letter letterPos={5} attemptVal={4}/> | ||
</div> | ||
<div className="row"> | ||
<Letter letterPos={0} attemptVal={5}/> | ||
<Letter letterPos={1} attemptVal={5}/> | ||
<Letter letterPos={2} attemptVal={5}/> | ||
<Letter letterPos={3} attemptVal={5}/> | ||
<Letter letterPos={4} attemptVal={5}/> | ||
<Letter letterPos={5} attemptVal={5}/> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Board |
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,11 @@ | ||
import React from 'react' | ||
|
||
type Props = {} | ||
|
||
function Keyboard({}: Props) { | ||
return ( | ||
<div>Keyboard</div> | ||
) | ||
} | ||
|
||
export default Keyboard |
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,15 @@ | ||
import React, { ReactPropTypes } from 'react' | ||
import PropTypes from 'prop-types'; | ||
|
||
type Props = { | ||
letterPos: number, | ||
attemptVal: number, | ||
} | ||
|
||
function Letter({letterPos, attemptVal}: Props) { | ||
return ( | ||
<div>Letter</div> | ||
) | ||
} | ||
|
||
export default Letter |
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,8 @@ | ||
export const boardDefault = [ | ||
["", "", "", "", ""], | ||
["", "", "", "", ""], | ||
["", "", "", "", ""], | ||
["", "", "", "", ""], | ||
["", "", "", "", ""], | ||
["", "", "", "", ""], | ||
] |
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 |
---|---|---|
|
@@ -21,6 +21,9 @@ | |
"jsx": "react-jsx" | ||
}, | ||
"include": [ | ||
"src" | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/*.ts", | ||
"src/*.tsx" | ||
] | ||
} |