Skip to content

Commit 45a031a

Browse files
committed
docs: update form docs
1 parent 5714b26 commit 45a031a

File tree

3 files changed

+206
-26
lines changed

3 files changed

+206
-26
lines changed

design/patterns/form/form.docs.mdx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,6 @@ function MyComponent() {
5353
}
5454
```
5555

56-
## Props
57-
58-
| Prop | Type | Default | Description |
59-
|------|------|---------|-------------|
60-
| fields | FormField[] | required | Array of form field configurations |
61-
| onSubmit | (values: Record<string, string>) => void | required | Callback when form is submitted |
62-
| submitText | string | 'Submit' | Text to display on the submit button |
63-
| initialValues | Record<string, string> | {} | Initial values for form fields |
64-
65-
### FormField Type
66-
67-
| Property | Type | Required | Description |
68-
|----------|------|----------|-------------|
69-
| name | string | Yes | Unique identifier for the field |
70-
| label | string | Yes | Label text for the field |
71-
| type | 'text' \| 'email' \| 'password' \| 'select' | Yes | Type of input field |
72-
| placeholder | string | No | Placeholder text for the field |
73-
| required | boolean | No | Whether the field is required |
74-
| options | Array<{ label: string; value: string }> | No | Options for select type fields |
75-
7656
## Examples
7757

7858
### Basic Form

pnpm-lock.yaml

Lines changed: 205 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workspace.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
"teambit.workspace/workspace-config-files": {
6060
"enableWorkspaceConfigWrite": true
6161
},
62-
"teambit.git/ci@a5f7b2d727b0aab82a92b494b9065f19c1ec66cc": {}
62+
"teambit.git/ci@5140f3ee5d5feb2192be1ac9fd34e7af58d444a4": {}
6363
}

0 commit comments

Comments
 (0)