[MM-60168] Migrate tooltips of "components/widgets/menu/menu_items/restricted_indicator.tsx" to WithTooltip (#27993)
Этот коммит содержится в:
@@ -7,12 +7,11 @@ import {useIntl} from 'react-intl';
|
||||
import type {MessageDescriptor} from 'react-intl';
|
||||
|
||||
import FeatureRestrictedModal from 'components/feature_restricted_modal/feature_restricted_modal';
|
||||
import OverlayTrigger from 'components/overlay_trigger';
|
||||
import ToggleModalButton from 'components/toggle_modal_button';
|
||||
import Tooltip from 'components/tooltip';
|
||||
import WithTooltip from 'components/with_tooltip';
|
||||
|
||||
import {FREEMIUM_TO_ENTERPRISE_TRIAL_LENGTH_DAYS} from 'utils/cloud_utils';
|
||||
import {Constants, LicenseSkus, ModalIdentifiers} from 'utils/constants';
|
||||
import {LicenseSkus, ModalIdentifiers} from 'utils/constants';
|
||||
|
||||
import './restricted_indicator.scss';
|
||||
|
||||
@@ -88,14 +87,10 @@ const RestrictedIndicator = ({
|
||||
|
||||
return (
|
||||
<span className='RestrictedIndicator__icon-tooltip-container'>
|
||||
<OverlayTrigger
|
||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
||||
placement='right'
|
||||
overlay={(
|
||||
<Tooltip
|
||||
id={`${feature}-tooltip`}
|
||||
className='RestrictedIndicator__icon-tooltip'
|
||||
>
|
||||
<WithTooltip
|
||||
id={`${feature}-tooltip`}
|
||||
title={
|
||||
<div className='RestrictedIndicator__icon-tooltip'>
|
||||
<span className='title'>
|
||||
{tooltipTitle || formatMessage({id: 'restricted_indicator.tooltip.title', defaultMessage: '{minimumPlanRequiredForFeature} feature'}, {minimumPlanRequiredForFeature: capitalizeFirstLetter(minimumPlanRequiredForFeature!)})}
|
||||
</span>
|
||||
@@ -106,8 +101,9 @@ const RestrictedIndicator = ({
|
||||
tooltipMessage || formatMessage({id: 'restricted_indicator.tooltip.mesage', defaultMessage: 'During your trial you are able to use this feature.'})
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
placement='right'
|
||||
>
|
||||
{useModal && blocked ? (
|
||||
<span>
|
||||
@@ -139,7 +135,7 @@ const RestrictedIndicator = ({
|
||||
{ctaExtraContent}
|
||||
</div>
|
||||
)}
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user