@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.
50 lines • 1.59 kB
JavaScript
import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import { ParticipantsGroupHeader } from './ParticipantsGroupHeader';
import { useHMSRoomStyleSheet } from '../../hooks-util';
import { ParticipantsGroupFooter } from './ParticipantsGroupFooter';
import { ParticipantsAccordianExpanded } from './ParticipantsAccordianExpanded';
export const ParticipantsAccordian = ({
open,
data,
showViewAll = false,
toggle,
onViewAllPress
}) => {
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
container: {
borderColor: theme.palette.border_bright
},
label: {
color: theme.palette.on_surface_medium,
fontFamily: `${typography.font_family}-SemiBold`
},
menu: {
backgroundColor: theme.palette.surface_default,
borderColor: theme.palette.border_bright
}
}));
return /*#__PURE__*/React.createElement(View, {
style: [styles.container, hmsRoomStyles.container]
}, /*#__PURE__*/React.createElement(ParticipantsGroupHeader, {
id: data.id,
label: data.label,
expanded: open,
toggleExpanded: toggle
}), open ? /*#__PURE__*/React.createElement(ParticipantsAccordianExpanded, {
id: data.id,
data: data.data
}) : null, open && showViewAll ? /*#__PURE__*/React.createElement(ParticipantsGroupFooter, {
groupId: data.id,
onViewAllPress: onViewAllPress
}) : null);
};
const styles = StyleSheet.create({
container: {
marginTop: 16,
borderWidth: 1,
borderRadius: 8,
overflow: 'hidden'
}
});
//# sourceMappingURL=ParticipantsAccordian.js.map