-
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
12 changed files
with
305 additions
and
96 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,17 @@ | ||
import React from "react"; | ||
import Questions from "../Components/Questions"; | ||
|
||
function Categories({ category }) { | ||
let questions = category.questions; | ||
return ( | ||
<div> | ||
<h2>{category.name}</h2> | ||
{questions.map((question, index) => { | ||
return ( | ||
<Questions key={index} data={question} /> | ||
); | ||
})} | ||
</div> | ||
); | ||
} | ||
export default Categories; |
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,17 @@ | ||
import React from "react"; | ||
|
||
|
||
function Choices({ choices }) { | ||
return ( | ||
<div> | ||
{choices.map((choice, index) => { | ||
return ( | ||
<div className="card-body" key={index}> | ||
<textarea className="form-control" defaultValue={choice.choice}></textarea> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); | ||
} | ||
export default Choices; |
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,31 @@ | ||
import React from "react"; | ||
import Choices from "../Components/Choices"; | ||
import { Card } from "react-bootstrap"; | ||
|
||
import { Question } from "../Model/Question"; | ||
|
||
function Questions({ data }) { | ||
let choices = data.choices; | ||
return ( | ||
<div> | ||
<Card className="CardPadding"> | ||
<h2 className="centered">Question</h2> | ||
<div className="card-body"> | ||
<textarea className="form-control" defaultValue={data.question}></textarea> | ||
</div> | ||
<h2>Choices</h2> | ||
<Choices choices={choices} /> | ||
<h2>Answer</h2> | ||
<div className="card-body"> | ||
<textarea className="form-control" defaultValue={data.answer}></textarea> | ||
</div> | ||
<h2>Hint</h2> | ||
<div className="card-body"> | ||
<textarea className="form-control" defaultValue={data.hint}></textarea> | ||
</div> | ||
</Card> | ||
|
||
</div > | ||
) | ||
} | ||
export default Questions; |
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
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
Oops, something went wrong.