UNPKG

@theoplayer/react-native-ui

Version:

A React Native UI for @theoplayer/react-native

41 lines (40 loc) 988 B
import React from 'react'; import { SafeAreaView, ScrollView, View } from 'react-native'; import { MenuTitle } from './MenuTitle'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /** * The default style for the scrollable menu. */ export const 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 */ export const ScrollableMenu = props => { const { title, items } = props; return /*#__PURE__*/_jsxs(SafeAreaView, { style: DEFAULT_SCROLLABLE_MENU_STYLE, children: [/*#__PURE__*/_jsx(MenuTitle, { label: title }), /*#__PURE__*/_jsx(ScrollView, { children: /*#__PURE__*/_jsx(View, { style: { flexDirection: 'column' }, children: items }) })] }); }; //# sourceMappingURL=ScrollableMenu.js.map