jiti-meet/react/features/conference/components/web/InsecureRoomNameLabel.js

36 lines
1.0 KiB
JavaScript
Raw Normal View History

2020-05-18 12:07:09 +00:00
// @flow
import Tooltip from '@atlaskit/tooltip';
import React from 'react';
import { translate } from '../../../base/i18n';
import { IconWarning } from '../../../base/icons';
import { Label } from '../../../base/label';
import { COLORS } from '../../../base/label/constants';
2020-05-18 12:07:09 +00:00
import { connect } from '../../../base/redux';
import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
/**
* Renders a label indicating that we are in a room with an insecure name.
*/
class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
/**
* Renders the platform dependent content.
2020-05-18 12:07:09 +00:00
*
* @inheritdoc
*/
_render() {
return (
<Tooltip
content = { this.props.t('security.insecureRoomNameWarning') }
position = 'bottom'>
<Label
color = { COLORS.red }
2020-05-18 12:07:09 +00:00
icon = { IconWarning } />
</Tooltip>
);
}
}
export default translate(connect(_mapStateToProps)(InsecureRoomNameLabel));