Skip to content

Commit

Permalink
refactor!: remove support of deprecated shouldAnimateOut option 👋
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `shouldAnimateOut` modal option deprecated since v2.0 is now being dropped completely. Use `animateConfigOut` or `animationOut` instead.
  • Loading branch information
CharlesMangwa committed Jan 24, 2022
1 parent e802dc1 commit 4d31b1f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/StackItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ const StackItem = <P extends ModalfyParams>({
closeModalCallback?: (closingElement: ModalStackItem<P>) => void,
modalStackItemCallback?: () => void,
) => {
if (!shouldAnimateOut) closeModalCallback?.(stackItem)
if (!closeModalCallback && animationIn) {
animationIn(animatedValue, toValue, modalStackItemCallback)
} else if (closeModalCallback && animationOut) {
Expand Down
7 changes: 0 additions & 7 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,6 @@ export interface ModalOptions {
* @see https://colorfy-software.gitbook.io/react-native-modalfy/api/types/modaloptions#position
*/
position?: 'center' | 'top' | 'bottom'
/**
* Should closing a modal be animated.
*
* @deprecated since v2.0 | Use `animateConfigOut` instead.
* @default false
*/
shouldAnimateOut?: boolean
/**
* `transitionOptions(animatedValue)` returns a React Native style object containing values that can use the provided `animatedValue` to run animation interpolations on a modal.
*
Expand Down
1 change: 0 additions & 1 deletion utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const defaultOptions: ModalOptions = {
easing: Easing.inOut(Easing.exp),
},
disableFlingGesture: false,
shouldAnimateOut: true,
backdropOpacity: 0.6,
backBehavior: 'pop',
containerStyle: {},
Expand Down

0 comments on commit 4d31b1f

Please sign in to comment.