From 9b1f5eae3440a59718c22bd4429e7cc544f62a65 Mon Sep 17 00:00:00 2001 From: bill Date: Sat, 1 Feb 2025 21:01:34 +1100 Subject: [PATCH] fix format --- src/components/ApiGallery.module.css | 2 +- src/components/ApiGallery.tsx | 3 ++- src/content/docs/createFormControl.mdx | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/ApiGallery.module.css b/src/components/ApiGallery.module.css index efee0ed7..4ff8b90e 100644 --- a/src/components/ApiGallery.module.css +++ b/src/components/ApiGallery.module.css @@ -100,5 +100,5 @@ p.beta { margin-bottom: -1rem; font-size: 0.7rem; - color: var(--color-light-grey) + color: var(--color-light-grey); } diff --git a/src/components/ApiGallery.tsx b/src/components/ApiGallery.tsx index 1b39f6b6..a457aaaf 100644 --- a/src/components/ApiGallery.tsx +++ b/src/components/ApiGallery.tsx @@ -167,7 +167,8 @@ export default function ApiGallery() {

BETA @v7.55.0-next.3

- Create form control object and subscribe form state outside of React component, access methods without context. + Create form control object and subscribe form state outside of + React component, access methods without context.

Object | `UseFormProps` | - ### Returns --- -| Name | Type | Description | -| ---------- | --------------------------- | -------------- | -| `formControl` | Object | control object for `useForm` hook | -| `control` | Object | control object for `useController`, `useFormState`, `useWatch` | -| `...returns` | Functions | `useForm` return methods | +| Name | Type | Description | +| ------------- | ------------------------------ | -------------------------------------------------------------- | +| `formControl` | Object | control object for `useForm` hook | +| `control` | Object | control object for `useController`, `useFormState`, `useWatch` | +| `...returns` | Functions | `useForm` return methods | - 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 ```tsx const props = createFormControl() - // ❌ You don't need provider +{" "} + // ❌ You don't need provider // ✅ Direct use method from createFormControl ``` @@ -90,7 +90,7 @@ const { formControl, register } = createFormControl(props) formControl.subscribe({ formState: { isDirty: true, - values: true + values: true, }, callback: (formState) => { if (formState.isDirty) { @@ -98,7 +98,7 @@ formControl.subscribe({ } if (formState.values.test.length > 3) { - // do something here + // do something here } }, }) @@ -110,7 +110,7 @@ function App() { return (
- +
) }