refactor(participants-pane) Refactored with reusable components

Created Reusable components for:
- ListItem - used by participants list and lobby participants list
- ContextMenu - used by participant context menu and advanced moderation context menu
- Quick action button - used by quick action buttons on participant list items

Moved participants custom theme to base/components/themes

Created reusable button component for all participants pane buttons (Invite, Mute All, More)

Moved web components to web folder

Moved all styles from Styled Components to JSS

Fixed accessibility labels for some buttons

Removed unused code

Updated all styles to use theme tokens
This commit is contained in:
robertpin
2021-10-22 16:23:52 +03:00
committed by vp8x8
parent 78e825de36
commit 7aca5e71b9
32 changed files with 1507 additions and 1049 deletions

View File

@@ -1,5 +1,6 @@
// @flow
import { makeStyles } from '@material-ui/core';
import React, { useCallback } from 'react';
@@ -21,6 +22,14 @@ type Props = {
onClose: Function
};
const useStyles = makeStyles(theme => {
return {
drawer: {
backgroundColor: theme.palette.ui02
}
};
});
/**
* Component that displays the mobile friendly drawer on web.
*
@@ -29,7 +38,9 @@ type Props = {
function Drawer({
children,
isOpen,
onClose }: Props) {
onClose
}: Props) {
const styles = useStyles();
/**
* Handles clicks within the menu, preventing the propagation of the click event.
@@ -58,7 +69,7 @@ function Drawer({
className = 'drawer-menu-container'
onClick = { handleOutsideClick }>
<div
className = 'drawer-menu'
className = { `drawer-menu ${styles.drawer}` }
onClick = { handleInsideClick }>
{children}
</div>