2019-04-11 09:43:13 +12:00
|
|
|
import React, { memo } from 'react';
|
2018-10-02 16:58:15 +13:00
|
|
|
import Icon from '../Icon';
|
2020-08-09 19:39:15 +02:00
|
|
|
import { I18n } from '../../locale';
|
2018-10-02 16:58:15 +13:00
|
|
|
|
2019-09-05 15:36:11 +12:00
|
|
|
export default memo((props) => {
|
|
|
|
|
if (props.mute) {
|
|
|
|
|
return (
|
|
|
|
|
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(false)}>
|
|
|
|
|
<Icon className="red-text" name="volume_off" />
|
2021-03-23 21:21:00 +13:00
|
|
|
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.unmute" /></span>}
|
2019-09-05 15:36:11 +12:00
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<button className={`control mute-control ${props.noTooltip ? '' : 'tooltip '}${props.className ? props.className : ''}`} onClick={() => props.onMuteChange(true)}>
|
|
|
|
|
<Icon className="muted" name="volume_mute" />
|
2021-03-23 21:21:00 +13:00
|
|
|
{props.noTooltip ? null : <span className="tooltip__content"><I18n path="playback_controls.mute" /></span>}
|
2019-09-05 15:36:11 +12:00
|
|
|
</button>
|
|
|
|
|
);
|
2019-04-11 09:43:13 +12:00
|
|
|
});
|