From 64d0bf4ec2d837fd97410d566a25cdbfaaf55078 Mon Sep 17 00:00:00 2001 From: Haydn Ewers <27211+haydn@users.noreply.github.com> Date: Thu, 28 Aug 2025 17:10:25 +1000 Subject: [PATCH] add description to form fields closes #10 --- src/app/ListForm.tsx | 207 +++++++++++++++++++++++++++---------------- 1 file changed, 131 insertions(+), 76 deletions(-) diff --git a/src/app/ListForm.tsx b/src/app/ListForm.tsx index 44236aa..dd009ca 100644 --- a/src/app/ListForm.tsx +++ b/src/app/ListForm.tsx @@ -1,4 +1,7 @@ +"use client"; + import { Action } from "@colonydb/anthill/Action"; +import { Block } from "@colonydb/anthill/Block"; import { Button } from "@colonydb/anthill/Button"; import { Card } from "@colonydb/anthill/Card"; import { CardContent } from "@colonydb/anthill/CardContent"; @@ -13,7 +16,9 @@ import { RegularField } from "@colonydb/anthill/RegularField"; import { Section } from "@colonydb/anthill/Section"; import { Specimen } from "@colonydb/anthill/Specimen"; import { StringInput } from "@colonydb/anthill/StringInput"; +import { TabSet } from "@colonydb/anthill/TabSet"; import { useForm } from "@colonydb/anthill/useForm"; +import { useState } from "react"; import * as v from "valibot"; import type { ListConfig } from "."; import List from "./List"; @@ -38,83 +43,133 @@ const schema = v.object({ url: v.pipe(v.string(), v.nonEmpty(), v.url()), }); -const ListForm = ({ id, list: initialList, onCancel, onSubmit, onSuccess, title }: Props) => ( -
+ ); +}; const Preview = () => { const { data } = useForm(schema); -- 2.51.2