Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/jump 2 question #54

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions components/QuizForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,23 @@ const QuizForm: React.FC<Props> = ({
<path strokeLinecap="round" strokeLinejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
</button>
<p className="text-white text-lg font-semibold flex justify-center relative w-[15%]">
<span className="absolute text-white opacity-10 font-bold text-4xl bottom-0">Q&A</span>
{currentQuestionIndex + 1}/{totalQuestions}
</p>
<div className="flex justify-center relative w-[15%] z-[1]">
<span className="absolute text-white opacity-10 font-bold text-6xl bottom-0 -z-[1] select-none">Q&A</span>
<input
className="w-[40px] text-white rounded-l-md border outline-0 border-slate-700 bg-slate-900 text-center text-md [-moz-appearance:_textfield] [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none"
type="number"
min={0}
max={totalQuestions}
defaultValue={currentQuestionIndex}
value={currentQuestionIndex}
onChange={(e) => {
handleNextQuestion(Number(e.target.value));
}}
/>
<p className="text-white text-md font-semibold text-center w-[40px] rounded-r-md border bg-slate-800 border-slate-700">
{totalQuestions}
</p>
</div>
<button
type="button"
onClick={() => {
Expand Down
Loading