import { Button } from '@/components/ui/button'; import { Label } from '@/components/ui/label'; import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; import { X } from 'lucide-react'; interface Props { question: ExamQuestion; answer: any; onAnswerChange: (answer: any) => void; } const McqQuestion = ({ question, answer, onAnswerChange }: Props) => { const selectedOption = answer?.selected_option_id || ''; const handleChange = (value: string) => { onAnswerChange({ selected_option_id: parseInt(value), }); }; const handleClear = () => { onAnswerChange(null); }; return (
Select the correct answer:
{selectedOption && ( )}