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
30 lines
615 B
TypeScript
30 lines
615 B
TypeScript
import { HIDE_TOOLTIP, SHOW_TOOLTIP } from './actionTypes';
|
|
|
|
/**
|
|
* Set tooltip state to visible.
|
|
*
|
|
* @param {string} content - The content of the tooltip.
|
|
* Used as unique identifier for tooltip.
|
|
* @returns {Object}
|
|
*/
|
|
export function showTooltip(content: string) {
|
|
return {
|
|
type: SHOW_TOOLTIP,
|
|
content
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Set tooltip state to hidden.
|
|
*
|
|
* @param {string} content - The content of the tooltip.
|
|
* Used as unique identifier for tooltip.
|
|
* @returns {Object}
|
|
*/
|
|
export function hideTooltip(content: string) {
|
|
return {
|
|
type: HIDE_TOOLTIP,
|
|
content
|
|
};
|
|
}
|