mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-19 23:37:46 +00:00
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
71 lines
1.3 KiB
JavaScript
71 lines
1.3 KiB
JavaScript
// @flow
|
|
|
|
import { makeStyles } from '@material-ui/styles';
|
|
import React from 'react';
|
|
|
|
import QuickActionButton from '../../../base/components/buttons/QuickActionButton';
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* Label used for accessibility.
|
|
*/
|
|
accessibilityLabel: string,
|
|
|
|
/**
|
|
* Component children
|
|
*/
|
|
children: string,
|
|
|
|
/**
|
|
* Button class name.
|
|
*/
|
|
className?: string,
|
|
|
|
/**
|
|
* Click handler function.
|
|
*/
|
|
onClick: Function,
|
|
|
|
/**
|
|
* Whether or not the button is secondary.
|
|
*/
|
|
secondary?: boolean,
|
|
|
|
/**
|
|
* Data test id.
|
|
*/
|
|
testId: string
|
|
}
|
|
|
|
const useStyles = makeStyles(theme => {
|
|
return {
|
|
secondary: {
|
|
backgroundColor: theme.palette.ui04
|
|
}
|
|
};
|
|
});
|
|
|
|
const LobbyParticipantQuickAction = ({
|
|
accessibilityLabel,
|
|
children,
|
|
className,
|
|
onClick,
|
|
secondary = false,
|
|
testId
|
|
}: Props) => {
|
|
const styles = useStyles();
|
|
|
|
return (
|
|
<QuickActionButton
|
|
accessibilityLabel = { accessibilityLabel }
|
|
className = { `${secondary ? styles.secondary : ''} ${className ?? ''}` }
|
|
onClick = { onClick }
|
|
testId = { testId }>
|
|
{children}
|
|
</QuickActionButton>
|
|
);
|
|
};
|
|
|
|
export default LobbyParticipantQuickAction;
|