/
Rics
/
JobReady
Обзор
Документация
Войти
/
Rics
/
JobReady
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Front/src/widgets/Question/Question.tsx
29 строк
857 B
Rics
add app
16 сен 2025, 16:56
16 сен 2025, 16:56
75981cd
Код
Авторство
О чём код?
import styles from './question.module.scss'; import {AnswerOption} from "@shared/components"; type QuestionProps = { number: number; text: string; options: string[]; selected: number | null; onSelect: (index: number) => void; }; export const Question = ({ number, text, options, selected, onSelect }: QuestionProps) => { return ( <div className={styles.question}> <h3>Вопрос №{number}</h3> <p>{text}</p> <div className={styles.options}> {options.map((opt, idx) => ( <AnswerOption key={idx} label={opt} checked={selected === idx} onChange={() => onSelect(idx)} /> ))} </div> </div> ); };