fix: QuizDetailCard input -> div로 변경

This commit is contained in:
정기영 2024-08-08 10:25:30 +09:00
parent 9667eb319a
commit c7261ae36a
2 changed files with 8 additions and 22 deletions

View File

@ -2,7 +2,7 @@ import styles from './QuizCard.module.css';
import { STATIC_URL } from '../../constants';
export default function QuizCard({ index, question, answer, image, choices }) {
console.log(question, answer, image, choices);
// TODO: /
return (
<div className={styles.card}>
<div className={styles.header}>
@ -20,28 +20,17 @@ export default function QuizCard({ index, question, answer, image, choices }) {
</div>
)}
<label className={styles.label}>질문</label>
<input
type="text"
value={question}
className={styles.input}
/>
<div className={styles.input}>{question}</div>
<label className={styles.label}>정답</label>
<input
type="text"
value={answer}
className={styles.input}
/>
<div className={styles.input}>{answer}</div>
<label className={styles.label}>선택지</label>
{choices.map?.((choice, idx) => (
<div
className={styles.choiceDiv}
key={idx}
>
<label>선택지 {choice.num} </label>
<input
className={`${styles.input} ${styles.choiceInput}`}
type="text"
value={choice.content}
/>
<label>{choice.num} </label>
<div className={`${styles.input} ${styles.choiceInput}`}>{choice.content}</div>
</div>
))}
</div>

View File

@ -36,12 +36,9 @@
height: 220px;
margin: 10px auto;
border-radius: 8px;
object-fit: contain;
background-color: var(--background-secondary);
cursor: pointer;
}
.hiddenInput {
display: none;
border: 1px solid var(--background-secondary);
}
.input {