fix(striker-ui): pass initial props, allow overwrite in confirm dialog hook

main
Tsu-ba-me 11 months ago
parent 3ea2fcc520
commit a20a2f7cc3
  1. 6
      striker-ui/hooks/useConfirmDialog.tsx

@ -28,9 +28,9 @@ const useConfirmDialog = (
const {
initial: {
actionProceedText = '',
closeOnProceed,
content = '',
titleText = '',
...restInitialProps
} = {},
} = args;
@ -74,12 +74,12 @@ const useConfirmDialog = (
const confirmDialog = useMemo<ReactElement>(
() => (
<ConfirmDialog
closeOnProceed={closeOnProceed}
{...restInitialProps}
{...confirmDialogProps}
ref={confirmDialogRef}
/>
),
[closeOnProceed, confirmDialogProps],
[confirmDialogProps, restInitialProps],
);
return {

Loading…
Cancel
Save