Skip to content

Commit

Permalink
fix: 🐛 resolves some type errors after merging in some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hvilander committed Mar 29, 2022
1 parent cf52069 commit 9af4838
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/SQFormDialogStepper/SQFormDialogStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export interface SQFormDialogStepperProps<Values extends FormikValues> {
/** Determine the max-width of the dialog. The dialog width grows with the size of the screen. Set to false to disable maxWidth. */
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
/** Callback function invoked when the user clicks on the secondary button or outside the Dialog */
onClose: () => void;
onClose: (
event: Record<string, unknown>,
reason: 'backdropClick' | 'escapeKeyDown' | 'cancelClick'
) => void;
/** Callback function invoked when user clicks primary submit button */
onSubmit: (values: Values, helpers: FormikHelpers<Values>) => void;
/** Title text at the top of the Dialog */
Expand Down Expand Up @@ -229,10 +232,10 @@ export function SQFormDialogStepper<Values extends FormikValues>({
}

const handleClose = (
event, // Record<string, unknown>,
reason // 'backdropClick' | 'escapeKeyDown' | 'cancelClick'
event: Record<string, unknown>,
reason: 'backdropClick' | 'escapeKeyDown' | 'cancelClick'
) => {
if (disableBackdropClick && reason === 'backDropClick') {
if (disableBackdropClick && reason === 'backdropClick') {
return;
}

Expand Down

0 comments on commit 9af4838

Please sign in to comment.