UNPKG

@theoplayer/react-native-ui

Version:

A React Native UI for @theoplayer/react-native

49 lines (47 loc) 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ScrollableMenu = exports.DEFAULT_SCROLLABLE_MENU_STYLE = void 0; var _react = _interopRequireDefault(require("react")); var _reactNative = require("react-native"); var _MenuTitle = require("./MenuTitle"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * The default style for the scrollable menu. */ const DEFAULT_SCROLLABLE_MENU_STYLE = exports.DEFAULT_SCROLLABLE_MENU_STYLE = { flex: 1, left: 0, right: 0, top: 0, bottom: 0, paddingRight: 10 }; /** * A menu component that provides a ScrollView for menu items for the `react-native-theoplayer` UI. * @param props * @constructor */ const ScrollableMenu = props => { const { title, items } = props; return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.SafeAreaView, { style: DEFAULT_SCROLLABLE_MENU_STYLE, children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuTitle.MenuTitle, { label: title }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: { flexDirection: 'column' }, children: items }) })] }); }; exports.ScrollableMenu = ScrollableMenu; //# sourceMappingURL=ScrollableMenu.js.map