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
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'] as const;
/**
* React component that wraps the platform `DrawerLayout` (Android only). The Drawer (typically used for navigation) is rendered with `renderNavigationView` and direct children are the main view. The navigation view is initially not visible on the screen, but can be pulled in from the side of the window specified by the `drawerPosition` prop and its width can be set by the `drawerWidth` prop.
*
* @see https://reactnative.dev/docs/drawerlayoutandroid
* DrawerLayoutAndroid is deprecated and will be removed in a future release.
* Use `react-native-drawer-layout` instead.
*
* @see https://reactnavigation.org/docs/drawer-layout/
* @platform android
* @deprecated
*/
class DrawerLayoutAndroid
extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export interface DrawerSlideEvent
extends NativeSyntheticEvent<NativeTouchEvent> {}

/**
* @see DrawerLayoutAndroid.android.js
* DrawerLayoutAndroid is deprecated and will be removed in a future release.
* Use `react-native-drawer-layout` instead.
* @see https://reactnavigation.org/docs/drawer-layout/
* @deprecated
*/
export interface DrawerLayoutAndroidProps extends ViewProps {
/**
Expand Down Expand Up @@ -123,6 +126,12 @@ interface DrawerPosition {
declare class DrawerLayoutAndroidComponent extends React.Component<DrawerLayoutAndroidProps> {}
declare const DrawerLayoutAndroidBase: Constructor<HostInstance> &
typeof DrawerLayoutAndroidComponent;
/**
* DrawerLayoutAndroid is deprecated and will be removed in a future release.
* Use `react-native-drawer-layout` instead.
* @see https://reactnavigation.org/docs/drawer-layout/
* @deprecated
*/
export class DrawerLayoutAndroid extends DrawerLayoutAndroidBase {
/**
* drawer's positions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export type DrawerSlideEvent = NativeSyntheticEvent<
}>,
>;

/**
* DrawerLayoutAndroid is deprecated and will be removed in a future release.
* Use `react-native-drawer-layout` instead.
* @see https://reactnavigation.org/docs/drawer-layout/
* @deprecated
*/
export type DrawerLayoutAndroidProps = Readonly<{
...ViewProps,

Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ module.exports = {
return require('./Libraries/Components/Button').default;
},
get DrawerLayoutAndroid() {
warnOnce(
'drawer-layout-android-deprecated',
'DrawerLayoutAndroid is deprecated and will be removed in a future release. ' +
"Use 'react-native-drawer-layout' instead. " +
'See https://reactnavigation.org/docs/drawer-layout/',
);
return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid')
.default;
},
Expand Down
Loading