fix(participants-pane): leave breakout room button appearance
This commit is contained in:
parent
ca095240b9
commit
02e4d2b902
|
@ -1,14 +1,20 @@
|
||||||
// @flow
|
/* eslint-disable lines-around-comment */
|
||||||
|
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
|
||||||
import Button from '../../../../../base/ui/components/native/Button';
|
import Button from '../../../../../base/ui/components/native/Button';
|
||||||
import { BUTTON_TYPES } from '../../../../../base/ui/constants';
|
import { BUTTON_TYPES } from '../../../../../base/ui/constants';
|
||||||
|
// @ts-ignore
|
||||||
import { createBreakoutRoom } from '../../../../../breakout-rooms/actions';
|
import { createBreakoutRoom } from '../../../../../breakout-rooms/actions';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button to add a breakout room.
|
||||||
|
*
|
||||||
|
* @returns {JSX.Element} - The add breakout room button.
|
||||||
|
*/
|
||||||
const AddBreakoutRoomButton = () => {
|
const AddBreakoutRoomButton = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
@ -21,7 +27,7 @@ const AddBreakoutRoomButton = () => {
|
||||||
accessibilityLabel = 'breakoutRooms.actions.add'
|
accessibilityLabel = 'breakoutRooms.actions.add'
|
||||||
label = 'breakoutRooms.actions.add'
|
label = 'breakoutRooms.actions.add'
|
||||||
onPress = { onAdd }
|
onPress = { onAdd }
|
||||||
style = { styles.addButton }
|
style = { styles.button }
|
||||||
type = { BUTTON_TYPES.SECONDARY } />
|
type = { BUTTON_TYPES.SECONDARY } />
|
||||||
);
|
);
|
||||||
};
|
};
|
|
@ -1,15 +1,20 @@
|
||||||
// @flow
|
/* eslint-disable lines-around-comment */
|
||||||
|
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
|
||||||
import Button from '../../../../../base/ui/components/native/Button';
|
import Button from '../../../../../base/ui/components/native/Button';
|
||||||
import { BUTTON_TYPES } from '../../../../../base/ui/constants';
|
import { BUTTON_TYPES } from '../../../../../base/ui/constants';
|
||||||
|
// @ts-ignore
|
||||||
import { autoAssignToBreakoutRooms } from '../../../../../breakout-rooms/actions';
|
import { autoAssignToBreakoutRooms } from '../../../../../breakout-rooms/actions';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button to auto assign participants to breakout rooms.
|
||||||
|
*
|
||||||
|
* @returns {JSX.Element} - The auto assign button.
|
||||||
|
*/
|
||||||
const AutoAssignButton = () => {
|
const AutoAssignButton = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
// @flow
|
/* eslint-disable lines-around-comment */
|
||||||
|
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { Button } from 'react-native-paper';
|
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics';
|
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics';
|
||||||
|
import Button from '../../../../../base/ui/components/native/Button';
|
||||||
|
import { BUTTON_TYPES } from '../../../../../base/ui/constants';
|
||||||
|
// @ts-ignore
|
||||||
import { moveToRoom } from '../../../../../breakout-rooms/actions';
|
import { moveToRoom } from '../../../../../breakout-rooms/actions';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button to leave a breakout rooms.
|
||||||
|
*
|
||||||
|
* @returns {JSX.Element} - The leave breakout room button.
|
||||||
|
*/
|
||||||
const LeaveBreakoutRoomButton = () => {
|
const LeaveBreakoutRoomButton = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const onLeave = useCallback(() => {
|
const onLeave = useCallback(() => {
|
||||||
|
@ -22,12 +28,11 @@ const LeaveBreakoutRoomButton = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
accessibilityLabel = { t('breakoutRooms.actions.leaveBreakoutRoom') }
|
accessibilityLabel = 'breakoutRooms.actions.leaveBreakoutRoom'
|
||||||
children = { t('breakoutRooms.actions.leaveBreakoutRoom') }
|
label = 'breakoutRooms.actions.leaveBreakoutRoom'
|
||||||
labelStyle = { styles.leaveButtonLabel }
|
|
||||||
mode = 'contained'
|
|
||||||
onPress = { onLeave }
|
onPress = { onLeave }
|
||||||
style = { styles.transparentButton } />
|
style = { styles.button }
|
||||||
|
type = { BUTTON_TYPES.DESTRUCTIVE } />
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,18 +8,12 @@ const baseButton = {
|
||||||
marginRight: BaseTheme.spacing[3]
|
marginRight: BaseTheme.spacing[3]
|
||||||
};
|
};
|
||||||
|
|
||||||
const baseLabel = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 30,
|
|
||||||
textTransform: 'capitalize'
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The styles of the native components of the feature {@code breakout rooms}.
|
* The styles of the native components of the feature {@code breakout rooms}.
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
addButton: {
|
button: {
|
||||||
marginTop: BaseTheme.spacing[3],
|
marginTop: BaseTheme.spacing[3],
|
||||||
marginLeft: BaseTheme.spacing[3],
|
marginLeft: BaseTheme.spacing[3],
|
||||||
marginRight: BaseTheme.spacing[3]
|
marginRight: BaseTheme.spacing[3]
|
||||||
|
@ -66,11 +60,6 @@ export default {
|
||||||
marginLeft: BaseTheme.spacing[2]
|
marginLeft: BaseTheme.spacing[2]
|
||||||
},
|
},
|
||||||
|
|
||||||
leaveButtonLabel: {
|
|
||||||
...baseLabel,
|
|
||||||
color: BaseTheme.palette.textError
|
|
||||||
},
|
|
||||||
|
|
||||||
autoAssignLabel: {
|
autoAssignLabel: {
|
||||||
color: BaseTheme.palette.link01
|
color: BaseTheme.palette.link01
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue