What's Changed
- fix: update background color by @a2937 in #375
- fix: add radio option color class by @a2937 in #376
- feat: allow customizing passing grade by @huyenltnguyen in #382
- feat: support displaying quiz answer feedback by @huyenltnguyen in #356
Breaking Changes
useQuiz
now requires apassingGrade
prop- The value of
correctAnswerCount
returned fromuseQuiz
can beundefined
instead of always being a number. Theundefined
value indicates that the quiz has not been validated (thevalidateAnswer
function hasn't been called) QuizQuestion
no longer accepts avalidation
prop. The prop is now folded into theQuizQuestion
'sanswers
prop.- Old:
<QuizQuestion question="Lorem ipsum" answers={[ { label: "Option 1", value: 1 }, { label: "Option 2", value: 2 }, ]} selectedAnswer={1} validation={{ state: "correct", message: "Correct!" }} />
- New:
<QuizQuestion question="Lorem ipsum" answers={[ { label: "Option 1", value: 1, validation: { state: "correct", message: "Correct!" } }, { label: "Option 2", value: 2 }, ]} selectedAnswer={1} />
- Old:
Full Changelog: v2.3.1...v3.0.0