bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/mute-button/component.jsx
2016-12-09 12:39:48 -08:00

28 lines
689 B
JavaScript
Executable File

import React from 'react';
import Button from '/imports/ui/components/button/component';
import styles from '../styles.scss';
export default class MuteAudio extends React.Component {
render() {
const { isInAudio, isMuted, callback } = this.props;
let label = !isMuted ? 'Mute' : 'Unmute';
let icon = !isMuted ? 'mute' : 'unmute';
let className = !isInAudio ? styles.invisible : null;
let tabIndex = !isInAudio ? -1 : 0;
return (
<Button
onClick={callback}
label={label}
color={'primary'}
icon={icon}
size={'lg'}
circle={true}
className={className}
tabIndex={tabIndex}
/>
);
}
}