/** * FormSkeleton.jsx * ================ * A shimmer-animated loading skeleton that mimics the form grid layout * while the schema is being fetched from the backend. * * Renders placeholder divs sized like toggle switches, number inputs, * and dropdowns to give a realistic "almost there" feel. */ import { Loader2 } from 'lucide-react'; /** * @param {{ fieldCount?: number, diseaseName?: string }} props */ export default function FormSkeleton({ fieldCount = 8, diseaseName = '' }) { // Generate placeholder rows const placeholders = Array.from({ length: fieldCount }, (_, i) => { // Alternate between field shapes for visual variety const type = i % 3; return (
Fetching schema for {diseaseName || '...'}