Files
jitsi-meet/react/features/participants-pane/components/web/FooterButton.js
robertpin 7aca5e71b9 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
2021-11-01 08:54:13 +02:00

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;