+ )}
+
+ >
);
```
diff --git a/src/components/list-field/ListField.stories.tsx b/src/components/list-field/ListField.stories.tsx
index ff408b4..4a8ad48 100644
--- a/src/components/list-field/ListField.stories.tsx
+++ b/src/components/list-field/ListField.stories.tsx
@@ -78,40 +78,53 @@ export const Primary = formStory({
},
});
+const typescriptBenefits = listFieldBuilder((value) =>
+ textField({ name: "ts-benefit", value }),
+);
+
export const Flat = formStory({
parameters: {
docs: {
description: {
story:
- "The array items can be plain field atoms. This is usefull when you want to capture list of primitives, e.g. strings or numbers. Here our hobbies list contains `FieldAtom` items.",
+ "The array items can be plain field atoms. This is usefull when you want to capture list of primitives, e.g. strings or numbers. Here our list of TypeScript benefits contains `FieldAtom` items.",
},
},
},
args: {
fields: {
- hobbies: [fieldAtom({ value: "gardening" })],
+ benefits: typescriptBenefits(["safe function calls", "it's fast"]),
},
children: ({ form }) => (
- fieldAtom({ value: "" })}
- >
- {({ fields, RemoveItemButton }) => (
-