mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user