[MM-59893] Migrate tooltips of 'components/app_bar/app_bar_marketplace.tsx' to WithTooltip (#27833)
Этот коммит содержится в:
@@ -2,7 +2,6 @@
|
|||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import React, {useCallback} from 'react';
|
import React, {useCallback} from 'react';
|
||||||
import {Tooltip} from 'react-bootstrap';
|
|
||||||
import {useIntl} from 'react-intl';
|
import {useIntl} from 'react-intl';
|
||||||
import {useDispatch} from 'react-redux';
|
import {useDispatch} from 'react-redux';
|
||||||
|
|
||||||
@@ -10,10 +9,10 @@ import {ViewGridPlusOutlineIcon} from '@mattermost/compass-icons/components';
|
|||||||
|
|
||||||
import {openModal} from 'actions/views/modals';
|
import {openModal} from 'actions/views/modals';
|
||||||
|
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
|
||||||
import MarketplaceModal from 'components/plugin_marketplace/marketplace_modal';
|
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 AppBarMarketplace = () => {
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
@@ -32,15 +31,10 @@ const AppBarMarketplace = () => {
|
|||||||
const label = formatMessage({id: 'app_bar.marketplace', defaultMessage: 'App Marketplace'});
|
const label = formatMessage({id: 'app_bar.marketplace', defaultMessage: 'App Marketplace'});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
trigger={['hover', 'focus']}
|
id='tooltip-app-bar-marketplace'
|
||||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
title={label}
|
||||||
placement='left'
|
placement='left'
|
||||||
overlay={(
|
|
||||||
<Tooltip id='tooltip-app-bar-marketplace'>
|
|
||||||
<span>{label}</span>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
key='app_bar_marketplace'
|
key='app_bar_marketplace'
|
||||||
@@ -50,7 +44,7 @@ const AppBarMarketplace = () => {
|
|||||||
>
|
>
|
||||||
<ViewGridPlusOutlineIcon size={18}/>
|
<ViewGridPlusOutlineIcon size={18}/>
|
||||||
</button>
|
</button>
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user