[MM-58515] Migrate tooltips of "components/shared_channel_indicator.tsx" to WithTooltip (#27247)

Этот коммит содержится в:
Arya Khochare
2024-07-20 15:05:20 +05:30
коммит произвёл GitHub
родитель c0874455f3
Коммит 50b3af38aa

Просмотреть файл

@@ -6,8 +6,7 @@ import {FormattedMessage} from 'react-intl';
import type {ChannelType} from '@mattermost/types/channels';
import OverlayTrigger from 'components/overlay_trigger';
import Tooltip from 'components/tooltip';
import WithTooltip from 'components/with_tooltip';
import {Constants} from 'utils/constants';
@@ -29,23 +28,21 @@ const SharedChannelIndicator: React.FC<Props> = (props: Props): JSX.Element => {
return sharedIcon;
}
const sharedTooltip = (
<Tooltip id='sharedTooltip'>
<FormattedMessage
id='shared_channel_indicator.tooltip'
defaultMessage='Shared with trusted organizations'
/>
</Tooltip>
const sharedTooltipText = (
<FormattedMessage
id='shared_channel_indicator.tooltip'
defaultMessage='Shared with trusted organizations'
/>
);
return (
<OverlayTrigger
delayShow={Constants.OVERLAY_TIME_DELAY}
<WithTooltip
id='sharedTooltip'
placement='bottom'
overlay={sharedTooltip}
title={sharedTooltipText}
>
{sharedIcon}
</OverlayTrigger>
</WithTooltip>
);
};