-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rolled back tsup split for react-ui and use submitForm cb correctly
- Loading branch information
1 parent
b61365f
commit 94906d5
Showing
11 changed files
with
153 additions
and
106 deletions.
There are no files selected for viewing
30 changes: 14 additions & 16 deletions
30
packages/react-ui-bootstrap/components/form/elements/FormElement.tsx
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import React, { HTMLAttributes, PropsWithChildren } from "react"; | ||
import { useFormContext } from '@vulcanjs/react-ui'; | ||
import { Form } from 'react-bootstrap'; | ||
import { useFormContext } from "@vulcanjs/react-ui"; | ||
import { Form } from "react-bootstrap"; | ||
|
||
// TODO: not sure of the expected props | ||
export const FormElement = /*Form*/ React.forwardRef<HTMLFormElement>( | ||
({ children, ...otherProps }: PropsWithChildren<any/*FormElementProps*/>, ref) => { | ||
const { submitForm } = useFormContext(); | ||
return ( | ||
<Form | ||
{...otherProps} | ||
// @ts-ignore | ||
onSubmit={submitForm} | ||
ref={ref} | ||
> | ||
{children} | ||
</Form> | ||
); | ||
} | ||
); | ||
( | ||
{ children, ...otherProps }: PropsWithChildren<any /*FormElementProps*/>, | ||
ref | ||
) => { | ||
const { submitForm } = useFormContext(); | ||
return ( | ||
<Form {...otherProps} onSubmit={submitForm} ref={ref}> | ||
{children} | ||
</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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from "./components/core"; | ||
export * from "./components/form"; | ||
export * from "./components/VulcanComponents"; | ||
export * from "./components/VulcanCurrentUser"; | ||
export * from "./componentsHelpers"; | ||
export * from "./components/core/index.js"; | ||
export * from "./components/form/index.js"; | ||
export * from "./components/VulcanComponents/index.js"; | ||
export * from "./components/VulcanCurrentUser/index.js"; | ||
export * from "./componentsHelpers.js"; |
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
94906d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vulcan-docs – ./docusaurus
vulcan-docs-vulcan.vercel.app
vulcan-docs.vercel.app
vulcan-docs-git-main-vulcan.vercel.app
94906d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vulcan-npm – ./
vulcan-npm-git-main-vulcan.vercel.app
vulcan-npm.vercel.app
vulcan-npm-vulcan.vercel.app