@theoplayer/react-native-ui
Version:
A React Native UI for @theoplayer/react-native
32 lines (31 loc) • 758 B
JavaScript
import { Text } from 'react-native';
import React, { useContext } from 'react';
import { PlayerContext } from '../../util/PlayerContext';
import { jsx as _jsx } from "react/jsx-runtime";
/**
* The default style for the menu title.
*/
export const DEFAULT_MENU_TITLE_STYLE = {
fontSize: 20,
lineHeight: 24,
padding: 10,
textAlign: 'center',
fontWeight: 'bold'
};
/**
* The title placed at the top of the fullscreen menu.
*/
export const MenuTitle = props => {
const {
label,
style
} = props;
const context = useContext(PlayerContext);
return /*#__PURE__*/_jsx(Text, {
style: [DEFAULT_MENU_TITLE_STYLE, {
color: context.style.colors.text
}, style],
children: label
});
};
//# sourceMappingURL=MenuTitle.js.map