-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
fd17cad
commit e79930a
Showing
7 changed files
with
103 additions
and
13 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,15 @@ | ||
import React from 'react'; | ||
|
||
const charComponent = props => { | ||
const style = { | ||
display: "inline-block", | ||
padding: "16px", | ||
textAlign: "center", | ||
margin: "16px", | ||
border: "1px solid black" | ||
}; | ||
|
||
return <div style={style} onClick={props.click}>{props.letter}</div> | ||
} | ||
|
||
export default charComponent; |
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,3 @@ | ||
.UserInput { | ||
border-radius: 5px; | ||
} |
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,25 @@ | ||
import React from 'react'; | ||
|
||
import "./UserInput.css"; | ||
|
||
const userInput = props => { | ||
|
||
const changeUsernameHandler = event => props.changeUsernameHandler(event.target.value); | ||
|
||
const style = { | ||
width: "100%", | ||
padding: "12px 20px", | ||
margin: "8px 0", | ||
boxSizing: "border-box" | ||
} | ||
|
||
return <input | ||
className="UserInput" | ||
type="text" | ||
style={style} | ||
value={props.username} | ||
onChange={changeUsernameHandler} | ||
></input>; | ||
} | ||
|
||
export default userInput; |
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,7 @@ | ||
.UserOutput { | ||
|
||
} | ||
|
||
.UserOutput > p { | ||
font-size: 12px; | ||
} |
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,14 @@ | ||
import React from 'react'; | ||
|
||
import './UserOutput.css'; | ||
|
||
const userOutput = props => { | ||
return ( | ||
<div className="UserOutput"> | ||
<p>My first paragraph {props.username}!</p> | ||
<p>My second paragrap</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default userOutput; |
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 @@ | ||
import React from 'react'; | ||
|
||
const validationComponent = props => { | ||
let advice = props.length < 5? "Text too short" : "Text long enough"; | ||
return <p>{advice}</p>; | ||
} | ||
|
||
export default validationComponent; |