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.

44 lines 1.23 kB
import * as React from 'react'; import { StyleSheet, View } from 'react-native'; import { parseMetadata } from '../../utils/functions'; import { BRBIcon, HandIcon } from '../../Icons'; import { useHMSRoomStyleSheet } from '../../hooks-util'; export const PeerMetadata = ({ metadata, isHandRaised }) => { const isBRBOn = !!parseMetadata(metadata).isBRBOn; const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({ iconWrapper: { backgroundColor: theme.palette.secondary_dim }, icon: { tintColor: theme.palette.on_secondary_high } })); if (isBRBOn) { return /*#__PURE__*/React.createElement(View, { style: [styles.iconWrapper, hmsRoomStyles.iconWrapper] }, /*#__PURE__*/React.createElement(BRBIcon, { style: hmsRoomStyles.icon })); } if (isHandRaised) { return /*#__PURE__*/React.createElement(View, { style: [styles.iconWrapper, hmsRoomStyles.iconWrapper] }, /*#__PURE__*/React.createElement(HandIcon, { style: hmsRoomStyles.icon })); } return null; }; const styles = StyleSheet.create({ iconWrapper: { position: 'absolute', top: 8, left: 8, padding: 4, borderRadius: 16 } }); //# sourceMappingURL=PeerMetadata.js.map