@umami/react-zen 0.180.0 → 0.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28704,7 +28704,7 @@ function FormSubmitButton({
|
|
|
28704
28704
|
...props
|
|
28705
28705
|
}) {
|
|
28706
28706
|
const {
|
|
28707
|
-
formState: { isDirty, isValid, isSubmitting,
|
|
28707
|
+
formState: { isDirty, isValid, isSubmitting, isLoading: formLoading }
|
|
28708
28708
|
} = useFormContext();
|
|
28709
28709
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
28710
28710
|
LoadingButton,
|
|
@@ -28712,8 +28712,8 @@ function FormSubmitButton({
|
|
|
28712
28712
|
...props,
|
|
28713
28713
|
type: "submit",
|
|
28714
28714
|
variant,
|
|
28715
|
-
isDisabled: isDisabled
|
|
28716
|
-
isLoading: isLoading
|
|
28715
|
+
isDisabled: isDisabled ?? (!isDirty || !isValid || isSubmitting),
|
|
28716
|
+
isLoading: isLoading ?? (formLoading || isSubmitting),
|
|
28717
28717
|
children
|
|
28718
28718
|
}
|
|
28719
28719
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -28585,7 +28585,7 @@ function FormSubmitButton({
|
|
|
28585
28585
|
...props
|
|
28586
28586
|
}) {
|
|
28587
28587
|
const {
|
|
28588
|
-
formState: { isDirty, isValid, isSubmitting,
|
|
28588
|
+
formState: { isDirty, isValid, isSubmitting, isLoading: formLoading }
|
|
28589
28589
|
} = useFormContext();
|
|
28590
28590
|
return /* @__PURE__ */ jsx20(
|
|
28591
28591
|
LoadingButton,
|
|
@@ -28593,8 +28593,8 @@ function FormSubmitButton({
|
|
|
28593
28593
|
...props,
|
|
28594
28594
|
type: "submit",
|
|
28595
28595
|
variant,
|
|
28596
|
-
isDisabled: isDisabled
|
|
28597
|
-
isLoading: isLoading
|
|
28596
|
+
isDisabled: isDisabled ?? (!isDirty || !isValid || isSubmitting),
|
|
28597
|
+
isLoading: isLoading ?? (formLoading || isSubmitting),
|
|
28598
28598
|
children
|
|
28599
28599
|
}
|
|
28600
28600
|
);
|