[MM-58515] Migrate tooltips of "components/shared_channel_indicator.tsx" to WithTooltip (#27247)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c0874455f3
Коммит
50b3af38aa
@@ -6,8 +6,7 @@ import {FormattedMessage} from 'react-intl';
|
|||||||
|
|
||||||
import type {ChannelType} from '@mattermost/types/channels';
|
import type {ChannelType} from '@mattermost/types/channels';
|
||||||
|
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
import Tooltip from 'components/tooltip';
|
|
||||||
|
|
||||||
import {Constants} from 'utils/constants';
|
import {Constants} from 'utils/constants';
|
||||||
|
|
||||||
@@ -29,23 +28,21 @@ const SharedChannelIndicator: React.FC<Props> = (props: Props): JSX.Element => {
|
|||||||
return sharedIcon;
|
return sharedIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sharedTooltip = (
|
const sharedTooltipText = (
|
||||||
<Tooltip id='sharedTooltip'>
|
<FormattedMessage
|
||||||
<FormattedMessage
|
id='shared_channel_indicator.tooltip'
|
||||||
id='shared_channel_indicator.tooltip'
|
defaultMessage='Shared with trusted organizations'
|
||||||
defaultMessage='Shared with trusted organizations'
|
/>
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
id='sharedTooltip'
|
||||||
placement='bottom'
|
placement='bottom'
|
||||||
overlay={sharedTooltip}
|
title={sharedTooltipText}
|
||||||
>
|
>
|
||||||
{sharedIcon}
|
{sharedIcon}
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user