import { IconChevronRight } from "@tabler/icons-react"; import type { ReactNode } from "react"; /** * หมวดการ์ดแบบพับได้ของหลังบ้าน (ใช้
เนทีฟ — คีย์บอร์ดและ screen reader ทำงานได้เอง) * ค่าเริ่มต้น = พับเก็บ เพื่อไม่ให้หน้าแอดมินยืดยาว */ type Props = { title: string; description?: string; /** ข้อความสั้น ๆ เช่นจำนวนรายการ */ badge?: string; defaultOpen?: boolean; children: ReactNode; }; export function AdminSection({ title, description, badge, defaultOpen = false, children, }: Props) { return (
{title} {badge ? ( {badge} ) : null} {description ? ( {description} ) : null}
{children}
); }