-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: quiz-new version updated (#495)
- Loading branch information
1 parent
ac14381
commit 532e777
Showing
5 changed files
with
123 additions
and
47 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
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,57 @@ | ||
import Logo from "../../../assets/images/Thecyberworld_logo_outlined.png"; | ||
import { ResetButton } from "./Categories/CategoriesElements"; | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const StartSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 50%; | ||
margin: auto; | ||
justify-content: center; | ||
align-items: center; | ||
h1 { | ||
font-size: 2rem; | ||
} | ||
img { | ||
width: 70%; | ||
} | ||
button { | ||
margin-top: 2rem; | ||
padding: 1rem 7rem; | ||
font-family: "Poppins", sans-serif; | ||
border-radius: 10px; | ||
} | ||
button:hover { | ||
background-color: #ff6b07; | ||
color: #000000; | ||
} | ||
@media screen and (max-width: 768px) { | ||
h1 { | ||
font-size: 1.5rem; | ||
} | ||
img { | ||
width: 100%; | ||
} | ||
button { | ||
padding: 1rem 3rem; | ||
} | ||
} | ||
`; | ||
|
||
const QuizStartSection = ({ setQuizStart }) => { | ||
return ( | ||
<StartSection> | ||
<h1>Quiz Section</h1> | ||
<img src={Logo} alt="" /> | ||
<ResetButton onClick={() => setQuizStart(true)}>Start now</ResetButton> | ||
</StartSection> | ||
); | ||
}; | ||
export default QuizStartSection; |
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,18 +1,10 @@ | ||
import React from "react"; | ||
import { QuizProgressIndicator, IndicatorDot } from "../../components/Resources/Quiz/Categories/CategoriesElements"; | ||
import { QuizProgressIndicator, ProgressBar } from "../../components/Resources/Quiz/Categories/CategoriesElements"; | ||
|
||
export default function RenderProgressIndicator({ questionsArray, currentQuestion }) { | ||
export default function RenderProgressIndicator({ currentQuestion, length }) { | ||
return ( | ||
<QuizProgressIndicator> | ||
{questionsArray.map((e, i) => { | ||
return ( | ||
<IndicatorDot | ||
key={i + "key"} | ||
id={i} | ||
questionCompleted={currentQuestion === i || currentQuestion > i} | ||
/> | ||
); | ||
})} | ||
<ProgressBar max={length} value={currentQuestion} /> | ||
</QuizProgressIndicator> | ||
); | ||
} |