UNPKG

@react-navigation/drawer

Version:

Integration for the drawer component from react-native-drawer-layout

33 lines (32 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawerContent = DrawerContent; var _DrawerContentScrollView = require("./DrawerContentScrollView.js"); var _DrawerItemList = require("./DrawerItemList.js"); var _jsxRuntime = require("react/jsx-runtime"); function DrawerContent({ descriptors, state, ...rest }) { const focusedRoute = state.routes[state.index]; const focusedDescriptor = descriptors[focusedRoute.key]; const focusedOptions = focusedDescriptor.options; const { drawerContentStyle, drawerContentContainerStyle } = focusedOptions; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerContentScrollView.DrawerContentScrollView, { ...rest, contentContainerStyle: drawerContentContainerStyle, style: drawerContentStyle, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerItemList.DrawerItemList, { descriptors: descriptors, state: state, ...rest }) }); } //# sourceMappingURL=DrawerContent.js.map