From cab4757be2a2259e649556575f2a7735a3049d37 Mon Sep 17 00:00:00 2001 From: Elijah Date: Sat, 27 Jun 2026 20:36:36 -0700 Subject: [PATCH] style: Align quiz results options UI with quiz viewer options UI --- src/components/quizzes/QuizResults.tsx | 45 ++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/src/components/quizzes/QuizResults.tsx b/src/components/quizzes/QuizResults.tsx index 7c7c2a3..4eaf406 100644 --- a/src/components/quizzes/QuizResults.tsx +++ b/src/components/quizzes/QuizResults.tsx @@ -118,17 +118,48 @@ export function QuizResults({ quiz, attempt, onRetake, onClose }: QuizResultsPro
{q.options.map((opt: any) => { const isSelected = sels.includes(opt.id); - let style = "text-text-body"; - if (opt.isCorrect) style = "text-success font-medium bg-success-bg/50 border-success/30"; - else if (isSelected && !opt.isCorrect) style = "text-error font-medium line-through bg-error-bg/50 border-error/30"; - else style = "border-transparent"; + let stateClass = "cursor-default opacity-80"; + let icon = null; + + if (opt.isCorrect) { + stateClass = "border-success bg-success-bg/30 text-text-heading"; + icon = ( + + + + ); + } else if (isSelected && !opt.isCorrect) { + stateClass = "border-error bg-error-bg/30 text-text-heading"; + icon = ( + + + + ); + } else { + stateClass = "border-border-light bg-bg-surface-alt/50"; + } return ( -
+
- {opt.isCorrect ? "✓" : (isSelected ? "✗" : "•")} +
+ {isSelected && ( + + + + )} +
-
{opt.text}
+
+ {opt.text} +
+ {icon && ( +
+ {icon} +
+ )}
); })}