@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
69 lines (65 loc) • 2.41 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _native = require("@react-navigation/native");
var _components = require("@wordpress/components");
var _element = require("@wordpress/element");
var _style = _interopRequireDefault(require("./style.scss"));
var _jsxRuntime = require("react/jsx-runtime");
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const HelpDetailNavigationScreen = ({
content,
label
}) => {
const navigation = (0, _native.useNavigation)();
const {
listProps
} = (0, _element.useContext)(_components.BottomSheetContext);
const contentContainerStyle = _reactNative.StyleSheet.flatten(listProps.contentContainerStyle);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BottomSheet.NavigationScreen, {
isScrollable: true,
fullScreen: true,
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: _style.default.container,
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.BottomSheet.NavBar, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BottomSheet.NavBar.BackButton, {
onPress: navigation.goBack
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BottomSheet.NavBar.Heading, {
children: label
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
...listProps,
contentContainerStyle: {
...contentContainerStyle,
paddingBottom: Math.max(listProps.safeAreaBottomInset, contentContainerStyle.paddingBottom),
/**
* Remove margin set via `hideHeader`. Combining a header
* and navigation in this bottom sheet is at odds with the
* current `BottomSheet` implementation.
*/
marginTop: 0
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback, {
accessible: false,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
children: content
})
})
})]
})
});
};
var _default = exports.default = HelpDetailNavigationScreen;
//# sourceMappingURL=help-detail-navigation-screen.native.js.map