feat: no longer export by default Form component

BREAKING CHANGE: you must use `import { Form } from 'react-component-form'`
This commit is contained in:
divlo
2021-06-17 19:24:21 +02:00
parent e3c4c53f23
commit 7ac46825ee
4 changed files with 11 additions and 8 deletions

View File

@ -22,7 +22,7 @@ const getFormDataObject = (formElement: HTMLFormElement): FormDataObject => {
return Object.fromEntries<FormDataEntryValue>(new FormData(formElement))
}
const Form = (props: FormProps): JSX.Element => {
export const Form = (props: FormProps): JSX.Element => {
const { onSubmit, onChange, children, ...rest } = props
const formRef = useRef<HTMLFormElement>(null)
@ -52,5 +52,3 @@ const Form = (props: FormProps): JSX.Element => {
</form>
)
}
export default Form