@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.
55 lines • 1.93 kB
JavaScript
import * as React from 'react';
import { Pressable, StyleSheet, View } from 'react-native';
import { useDispatch, useSelector } from 'react-redux';
import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
import { hexToRgbA } from '../../utils/theme';
import { useHMSRoomStyleSheet } from '../../hooks-util';
import { setChatMoreActionsSheetVisible } from '../../redux/actions';
import { ChatMoreActionsView } from './ChatMoreActionsView';
const _ChatMoreActionsSheetView = ({}) => {
const dispatch = useDispatch();
const chatMoreActionsSheetVisible = useSelector(state => state.app.chatMoreActionsSheetVisible);
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
backdrop: {
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.05)
}
}));
const closeFiltersBottomSheet = () => {
dispatch(setChatMoreActionsSheetVisible(false));
};
if (!chatMoreActionsSheetVisible) {
return null;
}
return /*#__PURE__*/React.createElement(View, {
style: styles.container
}, /*#__PURE__*/React.createElement(Pressable, {
onPress: closeFiltersBottomSheet,
style: [styles.backdrop, hmsRoomStyles.backdrop]
}), /*#__PURE__*/React.createElement(Animated.View, {
entering: FadeIn.duration(150),
exiting: FadeOut.duration(150),
style: styles.contentContainer
}, /*#__PURE__*/React.createElement(ChatMoreActionsView, null)));
};
const styles = StyleSheet.create({
container: {
position: 'absolute',
width: '100%',
height: '100%',
zIndex: 1,
justifyContent: 'flex-end'
},
backdrop: {
position: 'absolute',
width: '100%',
height: '100%'
},
contentContainer: {
position: 'absolute',
top: 60,
right: 48,
overflow: 'hidden'
}
});
export const ChatMoreActionsSheetView = /*#__PURE__*/React.memo(_ChatMoreActionsSheetView);
//# sourceMappingURL=ChatMoreActionsSheetView.js.map