import type { ReactNode } from "react"; import { COURSES, type StudentField, type StudentFormErrors, type StudentFormValues, } from "../lib/students"; type Props = { values: StudentFormValues; errors: StudentFormErrors; onChange: (field: StudentField, value: string) => void; disabled?: boolean; }; const inputClass = "w-full rounded-lg border border-white/10 bg-neutral-900/60 px-3 py-2 text-sm text-white placeholder:text-white/30 outline-none transition-colors focus:border-white/40 disabled:opacity-50"; export const buttonPrimaryClass = "inline-flex items-center justify-center gap-2 rounded-lg bg-white px-4 py-2 text-sm font-semibold text-neutral-900 transition-colors hover:bg-white/90 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer"; export const buttonGhostClass = "inline-flex items-center justify-center gap-2 rounded-lg border border-white/15 px-4 py-2 text-sm font-medium text-white/70 transition-colors hover:border-white/30 hover:text-white cursor-pointer"; export function Field({ label, error, hint, children, }: { label: string; error?: string; hint?: string; children: ReactNode; }) { return ( ); } /** The four student inputs, shared by the create form and the edit panel. */ export default function StudentFields({ values, errors, onChange, disabled }: Props) { return (
onChange("name", event.target.value)} />
onChange("email", event.target.value)} />
onChange("yearLevel", event.target.value)} />
); }