mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-19 23:27:47 +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
58 lines
1.1 KiB
JavaScript
58 lines
1.1 KiB
JavaScript
// @flow
|
|
|
|
import { makeStyles } from '@material-ui/styles';
|
|
import React from 'react';
|
|
|
|
import ParticipantPaneBaseButton from './ParticipantPaneBaseButton';
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* Label used for accessibility.
|
|
*/
|
|
accessibilityLabel: String,
|
|
|
|
/**
|
|
* Children of the component.
|
|
*/
|
|
children: string | React$Node,
|
|
|
|
/**
|
|
* button id.
|
|
*/
|
|
id?: string,
|
|
|
|
/**
|
|
* Whether or not the button is icon button (no text).
|
|
*/
|
|
isIconButton?: boolean,
|
|
|
|
/**
|
|
* Click handler
|
|
*/
|
|
onClick: Function
|
|
}
|
|
|
|
const useStyles = makeStyles(theme => {
|
|
return {
|
|
button: {
|
|
padding: `${theme.spacing(2)}px`
|
|
}
|
|
};
|
|
});
|
|
|
|
const FooterButton = ({ accessibilityLabel, children, id, isIconButton = false, onClick }: Props) => {
|
|
const styles = useStyles();
|
|
|
|
return (<ParticipantPaneBaseButton
|
|
accessibilityLabel = { accessibilityLabel }
|
|
className = { isIconButton ? styles.button : '' }
|
|
id = { id }
|
|
onClick = { onClick }>
|
|
{children}
|
|
</ParticipantPaneBaseButton>
|
|
);
|
|
};
|
|
|
|
export default FooterButton;
|