[MM-59893] Migrate tooltips of 'components/app_bar/app_bar_marketplace.tsx' to WithTooltip (#27833)

This commit is contained in:
Ivy Gesare 2024-08-06 13:22:06 +03:00 committed by GitHub
parent 69a8b3df0f
commit 72e83560e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
// See LICENSE.txt for license information.
import React, {useCallback} from 'react';
import {Tooltip} from 'react-bootstrap';
import {useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
@ -10,10 +9,10 @@ import {ViewGridPlusOutlineIcon} from '@mattermost/compass-icons/components';
import {openModal} from 'actions/views/modals';
import OverlayTrigger from 'components/overlay_trigger';
import MarketplaceModal from 'components/plugin_marketplace/marketplace_modal';
import WithTooltip from 'components/with_tooltip';
import {Constants, ModalIdentifiers} from 'utils/constants';
import {ModalIdentifiers} from 'utils/constants';
const AppBarMarketplace = () => {
const {formatMessage} = useIntl();
@ -32,15 +31,10 @@ const AppBarMarketplace = () => {
const label = formatMessage({id: 'app_bar.marketplace', defaultMessage: 'App Marketplace'});
return (
<OverlayTrigger
trigger={['hover', 'focus']}
delayShow={Constants.OVERLAY_TIME_DELAY}
<WithTooltip
id='tooltip-app-bar-marketplace'
title={label}
placement='left'
overlay={(
<Tooltip id='tooltip-app-bar-marketplace'>
<span>{label}</span>
</Tooltip>
)}
>
<button
key='app_bar_marketplace'
@ -50,7 +44,7 @@ const AppBarMarketplace = () => {
>
<ViewGridPlusOutlineIcon size={18}/>
</button>
</OverlayTrigger>
</WithTooltip>
);
};