mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-59893] Migrate tooltips of 'components/app_bar/app_bar_marketplace.tsx' to WithTooltip (#27833)
This commit is contained in:
parent
69a8b3df0f
commit
72e83560e2
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user