mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
Create Tooltip component Fix Popover positioning calculations Add margins to popover Remove @atlaskit/tooltip Update all components to use the new Tooltip component Added tooltip actions and reducers for the following functionality: when a user hovers over an element is sees the tooltip for that element and then hovers another element that has a tooltip, instead of using the delay and animations we just unmount the current tooltip and mount the next one immediately
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
import { IconExclamationTriangle } from '../../../base/icons/svg';
|
|
import Label from '../../../base/label/components/web/Label';
|
|
import { COLORS } from '../../../base/label/constants';
|
|
import Tooltip from '../../../base/tooltip/components/Tooltip';
|
|
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.
|
|
*
|
|
* @inheritdoc
|
|
*/
|
|
_render() {
|
|
return (
|
|
<Tooltip
|
|
content = { this.props.t('security.insecureRoomNameWarning') }
|
|
position = 'bottom'>
|
|
<Label
|
|
color = { COLORS.red }
|
|
icon = { IconExclamationTriangle } />
|
|
</Tooltip>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default translate(connect(_mapStateToProps)(InsecureRoomNameLabel));
|