[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 type {MessageDescriptor} from 'react-intl';
|
||||||
|
|
||||||
import FeatureRestrictedModal from 'components/feature_restricted_modal/feature_restricted_modal';
|
import FeatureRestrictedModal from 'components/feature_restricted_modal/feature_restricted_modal';
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
|
||||||
import ToggleModalButton from 'components/toggle_modal_button';
|
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 {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';
|
import './restricted_indicator.scss';
|
||||||
|
|
||||||
@@ -88,14 +87,10 @@ const RestrictedIndicator = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<span className='RestrictedIndicator__icon-tooltip-container'>
|
<span className='RestrictedIndicator__icon-tooltip-container'>
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
id={`${feature}-tooltip`}
|
||||||
placement='right'
|
title={
|
||||||
overlay={(
|
<div className='RestrictedIndicator__icon-tooltip'>
|
||||||
<Tooltip
|
|
||||||
id={`${feature}-tooltip`}
|
|
||||||
className='RestrictedIndicator__icon-tooltip'
|
|
||||||
>
|
|
||||||
<span className='title'>
|
<span className='title'>
|
||||||
{tooltipTitle || formatMessage({id: 'restricted_indicator.tooltip.title', defaultMessage: '{minimumPlanRequiredForFeature} feature'}, {minimumPlanRequiredForFeature: capitalizeFirstLetter(minimumPlanRequiredForFeature!)})}
|
{tooltipTitle || formatMessage({id: 'restricted_indicator.tooltip.title', defaultMessage: '{minimumPlanRequiredForFeature} feature'}, {minimumPlanRequiredForFeature: capitalizeFirstLetter(minimumPlanRequiredForFeature!)})}
|
||||||
</span>
|
</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.'})
|
tooltipMessage || formatMessage({id: 'restricted_indicator.tooltip.mesage', defaultMessage: 'During your trial you are able to use this feature.'})
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</div>
|
||||||
)}
|
}
|
||||||
|
placement='right'
|
||||||
>
|
>
|
||||||
{useModal && blocked ? (
|
{useModal && blocked ? (
|
||||||
<span>
|
<span>
|
||||||
@@ -139,7 +135,7 @@ const RestrictedIndicator = ({
|
|||||||
{ctaExtraContent}
|
{ctaExtraContent}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user