react-better-html 1.1.170 → 1.1.172

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.mjs CHANGED
@@ -3622,7 +3622,7 @@ var ModalComponent = forwardRef7(function Modal({
3622
3622
  document.body
3623
3623
  );
3624
3624
  });
3625
- ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3625
+ ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonText = "Continue", continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3626
3626
  const theme2 = useTheme();
3627
3627
  const modalRef = useRef3(null);
3628
3628
  const onCancelElement = useCallback6(() => {
@@ -3645,13 +3645,21 @@ ModalComponent.confirmation = forwardRef7(function Confirmation({ message, conti
3645
3645
  marginTop: theme2.styles.space * 2,
3646
3646
  children: [
3647
3647
  /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
3648
- /* @__PURE__ */ jsx12(Button_default, { text: "Continue", loaderName: continueButtonLoaderName, onClick: onContinueElement })
3648
+ /* @__PURE__ */ jsx12(Button_default, { text: continueButtonText, loaderName: continueButtonLoaderName, onClick: onContinueElement })
3649
3649
  ]
3650
3650
  }
3651
3651
  )
3652
3652
  ] });
3653
3653
  });
3654
- ModalComponent.destructive = forwardRef7(function Destructive2({ message, deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
3654
+ ModalComponent.destructive = forwardRef7(function Destructive2({
3655
+ message,
3656
+ deleteButtonText = "Delete",
3657
+ deleteButtonIconName = "trash",
3658
+ deleteButtonLoaderName,
3659
+ onDelete,
3660
+ onCancel,
3661
+ ...props
3662
+ }, ref) {
3655
3663
  const theme2 = useTheme();
3656
3664
  const modalRef = useRef3(null);
3657
3665
  const onCancelElement = useCallback6(() => {
@@ -3677,8 +3685,8 @@ ModalComponent.destructive = forwardRef7(function Destructive2({ message, delete
3677
3685
  /* @__PURE__ */ jsx12(
3678
3686
  Button_default.destructive,
3679
3687
  {
3680
- icon: "trash",
3681
- text: "Delete",
3688
+ icon: deleteButtonIconName,
3689
+ text: deleteButtonText,
3682
3690
  loaderName: deleteButtonLoaderName,
3683
3691
  onClick: onDeleteElement
3684
3692
  }
@@ -7440,6 +7448,10 @@ var FormComponent = forwardRef13(function Form({
7440
7448
  submitButtonId,
7441
7449
  submitButtonIsDisabled,
7442
7450
  cancelButtonText,
7451
+ cancelButtonLoaderName,
7452
+ cancelButtonIsLoading,
7453
+ cancelButtonId,
7454
+ cancelButtonIsDisabled,
7443
7455
  actionButtonsLocation = "right",
7444
7456
  gap,
7445
7457
  isDestructive,
@@ -7473,7 +7485,17 @@ var FormComponent = forwardRef13(function Form({
7473
7485
  marginTop: theme2.styles.space,
7474
7486
  children: [
7475
7487
  renderActionButtons,
7476
- onClickCancel && /* @__PURE__ */ jsx19(Button_default.secondary, { text: cancelButtonText ?? "Cancel", onClick: onClickCancel }),
7488
+ onClickCancel && /* @__PURE__ */ jsx19(
7489
+ Button_default.secondary,
7490
+ {
7491
+ text: cancelButtonText ?? "Cancel",
7492
+ isLoading: cancelButtonIsLoading,
7493
+ loaderName: cancelButtonLoaderName,
7494
+ disabled: cancelButtonIsDisabled,
7495
+ id: cancelButtonId,
7496
+ onClick: onClickCancel
7497
+ }
7498
+ ),
7477
7499
  /* @__PURE__ */ jsx19(
7478
7500
  SubmitButtonTag,
7479
7501
  {