DocDoeAI / src /components /exam-coach /ExamCoachQueryBox.tsx
asnannp's picture
deploy: sync backend to Space root (learn-lesson HF cache fix)
65d68f5
Raw History Blame Contribute Delete
1.39 kB
"use client";
/**
* Exam Coach Query Box
* Subject/topic input for Exam Coach
*/
import type { ExamCoachFormData } from "./examCoachTypes";
interface ExamCoachQueryBoxProps {
formData: ExamCoachFormData;
onChange: (data: ExamCoachFormData) => void;
disabled?: boolean;
}
export function ExamCoachQueryBox({ formData, onChange, disabled = false }: ExamCoachQueryBoxProps) {
return (
<div className="w-full max-w-2xl mx-auto">
<label htmlFor="exam-coach-topic" className="block text-sm text-white/75 mb-3">
Subject / Topic
</label>
<textarea
id="exam-coach-topic"
name="topic"
value={formData.topic}
onChange={(e) => onChange({ ...formData, topic: e.target.value })}
placeholder="e.g., +2 Physics, 12th Chemistry, NEET Biology..."
rows={3}
disabled={disabled}
aria-describedby="exam-coach-topic-help"
className="w-full px-4 py-3 bg-white/5 border border-white/10 rounded-xl text-white placeholder-white/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-300 focus:border-white/20 transition-colors resize-none disabled:cursor-not-allowed disabled:opacity-60"
/>
<p id="exam-coach-topic-help" className="text-xs text-white/50 mt-2">
Enter your exam subject, board, or specific chapters you want to prepare.
</p>
</div>
);
}