Skip to content

Commit 23edbfe

Browse files
committed
Replace FormTextarea occurences with Field
1 parent a4bb6ac commit 23edbfe

File tree

3 files changed

+12
-48
lines changed

3 files changed

+12
-48
lines changed

docs/reference/FormInput.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ The input transforms its value based on the `type` prop, which **currently suppo
1515
- `checkbox`
1616
- `radio`
1717

18-
It is allowed to use multiple inputs on the same field, all of them will be synchronized. These inputs are given a `className` when errored (`typed-form-error`) or modified (`typed-form-dirty`) by default.
18+
It is allowed to use multiple inputs on the same field, all of them will be synchronized.
19+
20+
These inputs are given a `className` when errored (`typed-form-error`) or modified (`typed-form-dirty`) by default.
1921

2022
## Examples
2123

@@ -111,6 +113,14 @@ const form = useForm({
111113

112114
### Textarea
113115

116+
```tsx
117+
const form = useForm({
118+
description: "Ullamco velit eiusmod eiusmod veniam nulla exercitation fugiat."
119+
});
120+
121+
<Field as="textarea" form={form} name="description" />;
122+
```
123+
114124
### Styling/custom component
115125

116126
TODO

docs/reference/FormTextArea.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

testing/src/ExampleForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function ExampleForm() {
8585
{/* A textarea */}
8686
<label>Long text</label>
8787
<Field form={form} name="longText" as="textarea" />
88-
<pre>{`<FormTextArea form={form} name="fieldName" />`}</pre>
88+
<pre>{`<Field as="textarea" form={form} name="fieldName" />`}</pre>
8989

9090
{/* A number input */}
9191
<label>Number</label>

0 commit comments

Comments
 (0)