Skip to content

Commit 9b1f5ea

Browse files
committed
fix format
1 parent 6951870 commit 9b1f5ea

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/components/ApiGallery.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@
100100
p.beta {
101101
margin-bottom: -1rem;
102102
font-size: 0.7rem;
103-
color: var(--color-light-grey)
103+
color: var(--color-light-grey);
104104
}

src/components/ApiGallery.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ export default function ApiGallery() {
167167
</h3>
168168
<p className={styles.beta}>BETA @v7.55.0-next.3</p>
169169
<p>
170-
Create form control object and subscribe form state outside of React component, access methods without context.
170+
Create form control object and subscribe form state outside of
171+
React component, access methods without context.
171172
</p>
172173
<Link
173174
href="/docs/createFormControl"

src/content/docs/createFormControl.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ This function create the entire form state subscription and allow you to subscri
1414
| ---------- | --------------------------- | -------------- |
1515
| `...props` | <TypeText>Object</TypeText> | `UseFormProps` |
1616

17-
1817
### Returns
1918

2019
---
2120

22-
| Name | Type | Description |
23-
| ---------- | --------------------------- | -------------- |
24-
| `formControl` | <TypeText>Object</TypeText> | control object for `useForm` hook |
25-
| `control` | <TypeText>Object</TypeText> | control object for `useController`, `useFormState`, `useWatch` |
26-
| `...returns` | <TypeText>Functions</TypeText> | `useForm` return methods |
21+
| Name | Type | Description |
22+
| ------------- | ------------------------------ | -------------------------------------------------------------- |
23+
| `formControl` | <TypeText>Object</TypeText> | control object for `useForm` hook |
24+
| `control` | <TypeText>Object</TypeText> | control object for `useController`, `useFormState`, `useWatch` |
25+
| `...returns` | <TypeText>Functions</TypeText> | `useForm` return methods |
2726

2827
<Admonition type="important" title="Notes">
2928
- This function is published at **v7.55.0-next.3** - This function is
@@ -37,7 +36,8 @@ This function create the entire form state subscription and allow you to subscri
3736
```tsx
3837
const props = createFormControl()
3938

40-
<FormProvider {...props} /> // ❌ You don't need provider
39+
{" "}
40+
<FormProvider {...props} /> // ❌ You don't need provider
4141

4242
<input {...props.register('name')} /> // ✅ Direct use method from createFormControl
4343
```
@@ -90,15 +90,15 @@ const { formControl, register } = createFormControl(props)
9090
formControl.subscribe({
9191
formState: {
9292
isDirty: true,
93-
values: true
93+
values: true,
9494
},
9595
callback: (formState) => {
9696
if (formState.isDirty) {
9797
// do something here
9898
}
9999

100100
if (formState.values.test.length > 3) {
101-
// do something here
101+
// do something here
102102
}
103103
},
104104
})
@@ -110,7 +110,7 @@ function App() {
110110

111111
return (
112112
<form>
113-
<input {...register('test')} />
113+
<input {...register("test")} />
114114
</form>
115115
)
116116
}

0 commit comments

Comments
 (0)