Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/react-native/Libraries/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import {NativeSyntheticEvent} from '../Types/CoreEventTypes';
import {ColorValue} from '../StyleSheet/StyleSheet';

export interface ModalBaseProps {
/**
* @deprecated Use animationType instead
*/
animated?: boolean | undefined;
/**
* The `animationType` prop controls how the modal animates.
*
Expand Down
5 changes: 0 additions & 5 deletions packages/react-native/Libraries/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ type OrientationChangeEvent = Readonly<{

/** @build-types emit-as-interface Uniwind compatibility */
export type ModalBaseProps = {
/**
* @deprecated Use `animationType` instead.
*/
animated?: boolean,

/**
* Controls how the modal animates. `'slide'` slides in from the bottom,
* `'fade'` fades into view, `'none'` appears without animation.
Expand Down
18 changes: 0 additions & 18 deletions packages/react-native/Libraries/Modal/__tests__/Modal-itest.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,24 +301,6 @@ describe('<Modal>', () => {
);
});
});

describe('animated', () => {
[true, false].forEach(animated => {
// The 'animated' prop is deprecated and ignored when the Modal is rendered
// Users should use the 'animationType' prop instead.
it(`[DEPRECATED] renders a Modal with animated="${animated ? 'true' : 'false'}"`, () => {
Fantom.runTask(() => {
root.render(<Modal animated={animated} />);
});

expect(root.getRenderedOutput({props: ['animated']}).toJSX()).toEqual(
<rn-modalHostView>
<rn-view />
</rn-modalHostView>,
);
});
});
});
// ... more props
});
describe('ref', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ internal class ReactModalHostManager :
@ReactProp(name = "presentationStyle")
override fun setPresentationStyle(view: ReactModalHostView, value: String?): Unit = Unit

@ReactProp(name = "animated")
override fun setAnimated(view: ReactModalHostView, value: Boolean): Unit = Unit

@ReactProp(name = "supportedOrientations")
override fun setSupportedOrientations(view: ReactModalHostView, value: ReadableArray?): Unit =
Unit
Expand Down
9 changes: 4 additions & 5 deletions packages/react-native/ReactNativeApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<42200de8ca10d30541e23b67547d9a13>>
* @generated SignedSource<<20bbe8284af4b8863a39651a46b7a53a>>
*
* This file was generated by scripts/js-api/build-types/index.js.
*/
Expand Down Expand Up @@ -3098,7 +3098,6 @@ declare type Message = {
}
declare type Modal = typeof Modal
declare interface ModalBaseProps {
animated?: boolean
animationType?: "fade" | "none" | "slide"
backdropColor?: ColorValue
modalRef?: React.Ref<ModalInstance>
Expand Down Expand Up @@ -6038,10 +6037,10 @@ export {
MeasureInWindowOnSuccessCallback, // a285f598
MeasureLayoutOnSuccessCallback, // 3592502a
MeasureOnSuccessCallback, // 82824e59
Modal, // c8c01498
ModalBaseProps, // 71945951
Modal, // 43f50013
ModalBaseProps, // ac3931ad
ModalInstance, // d466ce77
ModalProps, // 9f060027
ModalProps, // 35252d68
ModalPropsAndroid, // 515fb173
ModalPropsIOS, // 0e13cfcc
ModeChangeEvent, // f64bf69d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ type RCTModalHostViewNativeProps = Readonly<{
*/
visible?: WithDefault<boolean, false>,

/**
* Deprecated. Use the `animationType` prop instead.
*/
animated?: WithDefault<boolean, false>,

/**
* Controls whether the modal can be dismissed by swiping down on iOS.
* This requires you to implement the `onRequestClose` prop to handle the dismissal.
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -3350,7 +3350,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -3252,7 +3252,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -3347,7 +3347,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -5572,7 +5572,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -5496,7 +5496,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
1 change: 0 additions & 1 deletion scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -5569,7 +5569,6 @@ class facebook::react::ModalHostViewProps : public facebook::react::HostPlatform
public ModalHostViewProps() = default;
public ModalHostViewProps(const facebook::react::PropsParserContext& context, const facebook::react::ModalHostViewProps& sourceProps, const facebook::react::RawProps& rawProps);
public bool allowSwipeDismissal;
public bool animated;
public bool hardwareAccelerated;
public bool navigationBarTranslucent;
public bool statusBarTranslucent;
Expand Down
Loading