feat(native-participants-pane) fixed mute all content styles and added doInvitePeople action

This commit is contained in:
Calin Chitu 2021-05-26 14:08:00 +03:00 committed by Hristo Terezov
parent 8ca85f9e1c
commit ee101f8947
3 changed files with 16 additions and 1 deletions

View File

@ -1,17 +1,25 @@
// @flow
import React from 'react';
import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { Text, View } from 'react-native';
import { Button } from 'react-native-paper';
import { useDispatch } from 'react-redux';
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { Icon, IconInviteMore } from '../../../base/icons';
import { doInvitePeople } from '../../../invite/actions.native';
import { MeetingParticipantItem } from './MeetingParticipantItem';
import { participants } from './participants';
import styles from './styles';
export const MeetingParticipantList = () => {
const dispatch = useDispatch();
const onInvite = useCallback(() => {
sendAnalytics(createToolbarEvent('invite'));
dispatch(doInvitePeople());
}, [ dispatch ]);
const { t } = useTranslation();
return (
@ -30,6 +38,7 @@ export const MeetingParticipantList = () => {
}
labelStyle = { styles.inviteLabel }
mode = 'contained'
onPress = { onInvite }
style = { styles.inviteButton } />
{ participants.map(p => (
<MeetingParticipantItem

View File

@ -54,7 +54,9 @@ export function ParticipantsPane() {
<View style = { styles.footer }>
<Button
children = { t('participantsPane.actions.muteAll') }
contentStyle = { styles.muteAllContent }
labelStyle = { styles.muteAllLabel }
mode = 'contained'
onPress = { muteAll }
style = { styles.muteAllButton } />
<Button

View File

@ -268,6 +268,10 @@ export default {
left: BaseTheme.spacing[10] + BaseTheme.spacing[2]
},
muteAllContent: {
...buttonContent
},
muteAllLabel: {
color: BaseTheme.palette.text01,
textTransform: 'capitalize'