소스 검색

partially created questions component

develop
Ajay_S 3 년 전
부모
커밋
eed212f393
4개의 변경된 파일112개의 추가작업 그리고 49개의 파일을 삭제
  1. +40
    -0
      src/pages/Quiz/Question.module.scss
  2. +33
    -0
      src/pages/Quiz/Question.tsx
  3. +35
    -35
      src/pages/Quiz/Quiz.module.scss
  4. +4
    -14
      src/pages/Quiz/Quiz.tsx

+ 40
- 0
src/pages/Quiz/Question.module.scss 파일 보기

@@ -0,0 +1,40 @@
section {

.questionHolder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
text-align: center;
color: white;
width: 90%;
margin: 0 auto;
height: 27vh;
background-image: url("../../assets/icons/desktop-particles.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 150% 150%;

.questionNumber {
font-size: 1.3rem;
font-weight: 600;
}
.question {
font-size: 1.8rem;
font-weight: 300;
}

.quizTimer {
.border {
width: 6rem;
height: 6rem;
border-radius: 50%;
border: 0.2rem solid #6BD534;
.time {
margin-top: 1.8rem;
font-size: 1.4rem;
}
}
}
}
}

+ 33
- 0
src/pages/Quiz/Question.tsx 파일 보기

@@ -0,0 +1,33 @@
import { useState } from "react";
import styles from "./Question.module.scss";


interface OwnProp {
questionNumber: number;
question: string;
timeLimit: number;
}

const Question: React.FC<OwnProp> = (props) => {

return (
<section>
<div className={styles.questionHolder}>

<div className={styles.questionNumber}>Question {props.questionNumber}</div>

<div className={styles.question}>
{props.question}
</div>

<div className={styles.quizTimer}>
<div className={styles.border}>
<div className={styles.time}>01:00</div>
</div>
</div>
</div>
</section>
);
}

export default Question;

+ 35
- 35
src/pages/Quiz/Quiz.module.scss 파일 보기

@@ -44,43 +44,43 @@
}
}

.questionHolder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
text-align: center;
color: white;
width: 90%;
margin: 0 auto;
height: 27vh;
background-image: url("../../assets/icons/desktop-particles.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 150% 150%;
// .questionHolder {
// display: flex;
// flex-direction: column;
// align-items: center;
// justify-content: space-between;
// text-align: center;
// color: white;
// width: 90%;
// margin: 0 auto;
// height: 27vh;
// background-image: url("../../assets/icons/desktop-particles.svg");
// background-position: center;
// background-repeat: no-repeat;
// background-size: 150% 150%;

.questionNumber {
font-size: 1.3rem;
font-weight: 600;
}
.question {
font-size: 1.8rem;
font-weight: 300;
}
// .questionNumber {
// font-size: 1.3rem;
// font-weight: 600;
// }
// .question {
// font-size: 1.8rem;
// font-weight: 300;
// }

.quizTimer {
.border {
width: 6rem;
height: 6rem;
border-radius: 50%;
border: 0.2rem solid #6BD534;
.time {
margin-top: 1.8rem;
font-size: 1.4rem;
}
}
}
}
// .quizTimer {
// .border {
// width: 6rem;
// height: 6rem;
// border-radius: 50%;
// border: 0.2rem solid #6BD534;
// .time {
// margin-top: 1.8rem;
// font-size: 1.4rem;
// }
// }
// }
// }
}

.quizOptions {


+ 4
- 14
src/pages/Quiz/Quiz.tsx 파일 보기

@@ -5,6 +5,7 @@ import Options from './Options';
import { closeOutline } from 'ionicons/icons'
import { Link } from 'react-router-dom';
import { useState } from 'react';
import Question from './Question';


const options: string[] = [
@@ -33,20 +34,9 @@ const Quiz: React.FC = () => {
<IonIcon icon={closeOutline} />
</header>

<div className={styles.questionHolder}>

<div className={styles.questionNumber}>Question 01</div>

<div className={styles.question}>
How would you correctly display, “Hello, how are you?”?
</div>

<div className={styles.quizTimer}>
<div className={styles.border}>
<div className={styles.time}>01:00</div>
</div>
</div>
</div>
<Question question='How would you correctly display, “Hello, how are you?”?'
questionNumber={1}
timeLimit={1} />

</div>



불러오는 중...
취소
저장