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.

33 lines 1.08 kB
import React from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; import { GestureDetector, Gesture } from 'react-native-gesture-handler'; import { CloseIcon } from '../Icons'; import { ModalTypes } from '../utils/types'; import { useModalType } from '../hooks-util'; export const _HLSCloseMeetingControl = ({ onPress }) => { const { handleModalVisibleType } = useModalType(); const handleCloseBtnPress = () => { onPress === null || onPress === void 0 || onPress(); handleModalVisibleType(ModalTypes.LEAVE_ROOM); }; return /*#__PURE__*/React.createElement(GestureDetector, { gesture: Gesture.Tap() }, /*#__PURE__*/React.createElement(TouchableOpacity, { onPress: handleCloseBtnPress, style: styles.icon }, /*#__PURE__*/React.createElement(CloseIcon, { size: "medium" }))); }; export const HLSCloseMeetingControl = /*#__PURE__*/React.memo(_HLSCloseMeetingControl); const styles = StyleSheet.create({ icon: { padding: 4, alignSelf: 'flex-start' } }); //# sourceMappingURL=HLSCloseMeetingControl.js.map