Skip to content

Commit

Permalink
Merge pull request #80 from innovation-upstream/feat/add-onAnimationC…
Browse files Browse the repository at this point in the history
…omplete-prop-to-modal

feat: Add onAnimationComplete prop to modal
  • Loading branch information
ZacxDev authored May 19, 2022
2 parents 4a7554e + 1730831 commit 4bd8647
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/widgets/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Modal: React.FC<ModalProps> = ({
zIndex = "modal",
minWidth = "50%",
maxWidth = "80%",
onAnimationComplete,
...props
}) => {
return (
Expand All @@ -28,6 +29,7 @@ const Modal: React.FC<ModalProps> = ({
exit={{ opacity: 0, transform: "translate(-50%, -50%) scale(0)" }}
{...props}
sx={{ minWidth, maxWidth, zIndex, ...style.container }}
onAnimationComplete={onAnimationComplete}
>
{title && (
<ModalHeader onDismiss={onDismiss}>
Expand Down
1 change: 1 addition & 0 deletions src/widgets/Modal/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface InternalProps {
onDismiss?: () => void;
onAnimationComplete?: () => void;
t?: (key: string) => string;
}

Expand Down

0 comments on commit 4bd8647

Please sign in to comment.