Skip to content

Commit c3447e4

Browse files
committed
Remove Modal animated prop
1 parent d833014 commit c3447e4

5 files changed

Lines changed: 0 additions & 34 deletions

File tree

packages/react-native/Libraries/Modal/Modal.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import {NativeSyntheticEvent} from '../Types/CoreEventTypes';
1313
import {ColorValue} from '../StyleSheet/StyleSheet';
1414

1515
export interface ModalBaseProps {
16-
/**
17-
* @deprecated Use animationType instead
18-
*/
19-
animated?: boolean | undefined;
2016
/**
2117
* The `animationType` prop controls how the modal animates.
2218
*

packages/react-native/Libraries/Modal/Modal.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ type OrientationChangeEvent = Readonly<{
6565

6666
/** @build-types emit-as-interface Uniwind compatibility */
6767
export type ModalBaseProps = {
68-
/**
69-
* @deprecated Use animationType instead
70-
*/
71-
animated?: boolean,
7268
/**
7369
* The `animationType` prop controls how the modal animates.
7470
*

packages/react-native/Libraries/Modal/__tests__/Modal-itest.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -301,24 +301,6 @@ describe('<Modal>', () => {
301301
);
302302
});
303303
});
304-
305-
describe('animated', () => {
306-
[true, false].forEach(animated => {
307-
// The 'animated' prop is deprecated and ignored when the Modal is rendered
308-
// Users should use the 'animationType' prop instead.
309-
it(`[DEPRECATED] renders a Modal with animated="${animated ? 'true' : 'false'}"`, () => {
310-
Fantom.runTask(() => {
311-
root.render(<Modal animated={animated} />);
312-
});
313-
314-
expect(root.getRenderedOutput({props: ['animated']}).toJSX()).toEqual(
315-
<rn-modalHostView>
316-
<rn-view />
317-
</rn-modalHostView>,
318-
);
319-
});
320-
});
321-
});
322304
// ... more props
323305
});
324306
describe('ref', () => {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ internal class ReactModalHostManager :
7272
@ReactProp(name = "presentationStyle")
7373
override fun setPresentationStyle(view: ReactModalHostView, value: String?): Unit = Unit
7474

75-
@ReactProp(name = "animated")
76-
override fun setAnimated(view: ReactModalHostView, value: Boolean): Unit = Unit
77-
7875
@ReactProp(name = "supportedOrientations")
7976
override fun setSupportedOrientations(view: ReactModalHostView, value: ReadableArray?): Unit =
8077
Unit

packages/react-native/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ type RCTModalHostViewNativeProps = Readonly<{
107107
*/
108108
visible?: WithDefault<boolean, false>,
109109

110-
/**
111-
* Deprecated. Use the `animationType` prop instead.
112-
*/
113-
animated?: WithDefault<boolean, false>,
114-
115110
/**
116111
* Controls whether the modal can be dismissed by swiping down on iOS.
117112
* This requires you to implement the `onRequestClose` prop to handle the dismissal.

0 commit comments

Comments
 (0)