UNPKG

@freecodecamp/ui

Version:

The freeCodeCamp.org open-source UI components

12 lines (11 loc) 703 B
import React from "react"; import type { QuizQuestionProps } from "./types"; /** * QuizQuestion is a radio group that allows users to select a single option from a list of multiple options. * The component can be used as a standalone component or in a group of multiple questions. * * QuizQuestion does not track its selected option internally, * but instead, it provides a `selectedAnswer` and an `onChange` props, * giving the parent component full control over the selection handling logic. */ export declare const QuizQuestion: <AnswerT extends number | string>({ question, answers, required, disabled, selectedAnswer, onChange, position, }: QuizQuestionProps<AnswerT>) => React.JSX.Element;