UNPKG

@100mslive/react-native-room-kit

Version:

100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.

48 lines 1.75 kB
import * as React from 'react'; import Modal from 'react-native-modal'; import { StyleSheet } from 'react-native'; import { useDispatch, useSelector } from 'react-redux'; import { SafeAreaView } from 'react-native-safe-area-context'; import { useHMSRoomColorPalette, useHMSRoomStyle } from '../hooks-util'; import { setFullScreenWhiteboard } from '../redux/actions'; import { Whiteboard } from './Whiteboard'; export const FullScreenWhiteboard = () => { const dispatch = useDispatch(); const fullScreenWhiteboard = useSelector(state => state.app.fullScreenWhiteboard); const { background_dim: backgroundDimColor } = useHMSRoomColorPalette(); const contentContainerStyles = useHMSRoomStyle(theme => ({ backgroundColor: theme.palette.background_dim })); const handleClosingFullScreenView = () => { dispatch(setFullScreenWhiteboard(false)); }; return /*#__PURE__*/React.createElement(Modal, { isVisible: fullScreenWhiteboard, animationIn: 'fadeInUp', animationInTiming: 100, animationOutTiming: 100, animationOut: 'fadeOutDown', backdropColor: backgroundDimColor, backdropOpacity: 0.3, onBackButtonPress: handleClosingFullScreenView, onBackdropPress: handleClosingFullScreenView, useNativeDriver: true, useNativeDriverForBackdrop: true, hideModalContentWhileAnimating: true, style: styles.modal, supportedOrientations: ['portrait', 'landscape'] }, /*#__PURE__*/React.createElement(SafeAreaView, { style: [contentContainerStyles, styles.container] }, /*#__PURE__*/React.createElement(Whiteboard, null))); }; const styles = StyleSheet.create({ modal: { margin: 0 }, container: { flexGrow: 1 } }); //# sourceMappingURL=FullScreenWhiteboard.js.map