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.

31 lines 1.24 kB
import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { ParticipantsList, ParticipantsSearchInput } from '../Participants'; import { MultiRoleParticipantsList } from '../Participants/MultiRoleParticipantsList'; export const ParticipantsView = () => { const [searchText, setSearchText] = React.useState(''); const [selectedGroupId, setSelectedGroupId] = React.useState(null); const clearSelectedGroup = React.useCallback(() => { setSelectedGroupId(null); }, []); return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ParticipantsSearchInput, { searchText: searchText, setSearchText: setSearchText }), /*#__PURE__*/React.createElement(View, { style: styles.listWrapper }, selectedGroupId === null ? /*#__PURE__*/React.createElement(MultiRoleParticipantsList, { searchText: searchText, onViewAllPress: setSelectedGroupId }) : /*#__PURE__*/React.createElement(ParticipantsList, { searchText: searchText, selectedGroupId: selectedGroupId, onBackPress: clearSelectedGroup }))); }; const styles = StyleSheet.create({ listWrapper: { flex: 1, marginTop: 8 } }); //# sourceMappingURL=ParticipantsView.js.map