-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from vantezzen/feat/v2.1
- Loading branch information
Showing
109 changed files
with
4,429 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Cypress Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build packages | ||
run: npm run build | ||
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
install-command: npm install | ||
project: apps/web | ||
start: npm run cypress | ||
browser: chrome | ||
component: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# API | ||
|
||
## schema: SchemaProvider | ||
|
||
The `schema` prop is used to pass the schema to the form. It can be a `ZodProvider` or a `YupProvider`. | ||
|
||
## onSubmit?: (values: T, form: FormInstance) => void | ||
|
||
The `onSubmit` prop is called when the form is submitted and the data is valid. It receives the form data and the form instance from react-hook-form. | ||
|
||
## onFormInit?: (form: FormInstance) => void | ||
|
||
The `onFormInit` prop is called when the form is initialized. It receives the form instance from react-hook-form. | ||
|
||
## withSubmit?: boolean | ||
|
||
The `withSubmit` prop is used to automatically add a submit button to the form. It defaults to `false`. | ||
|
||
## defaultValues?: Partial\<T> | ||
|
||
The `defaultValues` prop is used to set the initial values of the form. | ||
|
||
## values: Partial\<T> | ||
|
||
The `values` prop is used to set the values of the form. It is a controlled input. | ||
|
||
## children: React.ReactNode | ||
|
||
All children passed to the `AutoForm` component will be rendered below the form. | ||
|
||
## formComponents: Partial\<AutoFormFieldComponents> | ||
|
||
Additional, custom form components can be passed to the `formComponents` prop. This allows you to add custom field types to the form. | ||
|
||
## uiComponents: Partial\<AutoFormUIComponents> | ||
|
||
Override the default UI components with custom components. This allows you to customize the look and feel of the form. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.