UNPKG

@theoplayer/react-native-ui

Version:

A React Native UI for @theoplayer/react-native

41 lines (39 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MenuTitle = exports.DEFAULT_MENU_TITLE_STYLE = void 0; var _reactNative = require("react-native"); var _react = _interopRequireDefault(require("react")); var _PlayerContext = require("../../util/PlayerContext"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * The default style for the menu title. */ const DEFAULT_MENU_TITLE_STYLE = exports.DEFAULT_MENU_TITLE_STYLE = { fontSize: 20, lineHeight: 24, padding: 10, textAlign: 'center', fontWeight: 'bold' }; /** * The title placed at the top of the fullscreen menu. */ const MenuTitle = props => { const { label, style } = props; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayerContext.PlayerContext.Consumer, { children: context => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, { style: [DEFAULT_MENU_TITLE_STYLE, { color: context.style.colors.text }, style], children: label }) }); }; exports.MenuTitle = MenuTitle; //# sourceMappingURL=MenuTitle.js.map