Files
jitsi-meet/react/features/e2ee/components/E2EELabel.tsx
Robert Pintilii 00780929e5 feat(tooltip) Create and move to our component (#13061)
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
2023-03-17 12:23:51 +02:00

31 lines
893 B
TypeScript

import React from 'react';
import { connect } from 'react-redux';
import { translate } from '../../base/i18n/functions';
import { IconE2EE } 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 { IProps, _mapStateToProps } from './AbstractE2EELabel';
const E2EELabel = ({ _e2eeLabels, _showLabel, t }: IProps) => {
if (!_showLabel) {
return null;
}
const content = _e2eeLabels?.labelToolTip || t('e2ee.labelToolTip');
return (
<Tooltip
content = { content }
position = { 'bottom' }>
<Label
color = { COLORS.green }
icon = { IconE2EE } />
</Tooltip>
);
};
export default translate(connect(_mapStateToProps)(E2EELabel));