feat: 发布 v0.3.0 移动端答题优化

This commit is contained in:
2026-06-23 00:51:32 +02:00
parent 89675a526f
commit 81a70137a9
11 changed files with 134 additions and 71 deletions
@@ -12,20 +12,22 @@ export const Question = forwardRef<HTMLDivElement, QuestionProps>(
return (
<div
ref={ref}
className="mb-8 p-6 bg-white rounded-lg shadow-sm"
className="mb-4 scroll-mt-20 rounded-md border bg-white p-4 shadow-sm md:mb-8 md:p-6"
id={`question-${question.id}`}
>
<h3 className="text-lg font-medium mb-4">
<h3 className="mb-4 text-[17px] font-medium leading-[1.65] md:text-lg md:leading-7">
{question.id}. {question.content}
</h3>
<div className="space-y-2">
{question.options.map((option) => (
<button
type="button"
aria-pressed={answer === option.value}
key={option.value}
className={`w-full text-left p-3 rounded-lg transition-colors duration-200
className={`min-h-12 w-full touch-manipulation rounded-md px-4 py-3 text-left text-base leading-6 transition-colors duration-200
${answer === option.value
? 'bg-blue-100 border-blue-500 border-2'
: 'border hover:bg-gray-50'
? 'border-2 border-blue-600 bg-blue-50 font-medium text-blue-950'
: 'border bg-white active:bg-gray-100 md:hover:bg-gray-50'
}`}
onClick={() => onSelect(question.id, option.value)}
>
@@ -38,4 +40,4 @@ export const Question = forwardRef<HTMLDivElement, QuestionProps>(
}
);
Question.displayName = 'Question';
Question.displayName = 'Question';