Skip to content

Commit

Permalink
Remove animated prop
Browse files Browse the repository at this point in the history
Summary:
This prop was deprecated in April 2016 in [this commit](2bb1c26#diff-931cea019b5e9faceffef4e46f1fff08), first in 0.26.0

It's been a while, we can remove it now.

Changelog:
[Breaking][General] Modal: Remove support for `aniamted` prop (deprecated in 0.26)

Reviewed By: cpojer

Differential Revision: D19762163

fbshipit-source-id: b6173bba066fc9ad0e786f56a946e2f3fa3d79cc
  • Loading branch information
TheSavior authored and facebook-github-bot committed Feb 6, 2020
1 parent 4e6adc9 commit 1e9db7b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions Libraries/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ export type Props = $ReadOnly<{|
*/
onDismiss?: ?() => mixed,

/**
* Deprecated. Use the `animationType` prop instead.
*/
animated?: ?boolean,

/**
* The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations.
*
Expand Down Expand Up @@ -212,14 +207,7 @@ class Modal extends React.Component<Props> {
backgroundColor: this.props.transparent ? 'transparent' : 'white',
};

let animationType = this.props.animationType;
if (!animationType) {
// manually setting default prop here to keep support for the deprecated 'animated' prop
animationType = 'none';
if (this.props.animated) {
animationType = 'slide';
}
}
let animationType = this.props.animationType || 'none';

let presentationStyle = this.props.presentationStyle;
if (!presentationStyle) {
Expand Down

0 comments on commit 1e9db7b

Please sign in to comment.