From 5ac9409b550b24626884b07f38eca298dbae012a Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Thu, 14 Sep 2023 23:45:11 -0500 Subject: [PATCH] Group site checklist into sections --- src/components/Checklist.tsx | 25 ++++++++++++++++++------- src/components/ChecklistRow.tsx | 2 +- src/site/SiteChecklistClient.tsx | 6 +++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/components/Checklist.tsx b/src/components/Checklist.tsx index 911ed416..fcf813b1 100644 --- a/src/components/Checklist.tsx +++ b/src/components/Checklist.tsx @@ -1,18 +1,29 @@ import { cc } from '@/utility/css'; export default function Checklist({ + title, children, }: { + title?: string children: React.ReactNode }) { return ( -
- {children} +
+ {title && +
+ {title} +
} +
+ {children} +
); } diff --git a/src/components/ChecklistRow.tsx b/src/components/ChecklistRow.tsx index 5453c49c..bb15eff3 100644 --- a/src/components/ChecklistRow.tsx +++ b/src/components/ChecklistRow.tsx @@ -18,7 +18,7 @@ export default function ChecklistRow({ return (
diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index 69c7568a..d4faea51 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -101,7 +101,7 @@ export default function SiteChecklistClient({ return (
- + + + + +