[MM-58513] Migrate tooltips of "components/channel_info_rhs/header.tsx" to WithTooltip (#27240)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fe5ddaee8e
Коммит
9bf07437cf
@@ -7,10 +7,7 @@ import styled from 'styled-components';
|
|||||||
|
|
||||||
import type {Channel} from '@mattermost/types/channels';
|
import type {Channel} 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';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
channel: Channel;
|
channel: Channel;
|
||||||
@@ -29,14 +26,6 @@ const HeaderTitle = styled.span`
|
|||||||
|
|
||||||
const Header = ({channel, isArchived, isMobile, onClose}: Props) => {
|
const Header = ({channel, isArchived, isMobile, onClose}: Props) => {
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
const closeSidebarTooltip = (
|
|
||||||
<Tooltip id='closeSidebarTooltip'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='rhs_header.closeSidebarTooltip'
|
|
||||||
defaultMessage='Close'
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='sidebar--right__header'>
|
<div className='sidebar--right__header'>
|
||||||
@@ -69,10 +58,15 @@ const Header = ({channel, isArchived, isMobile, onClose}: Props) => {
|
|||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
id='closeSidebarTooltip'
|
||||||
placement='top'
|
placement='top'
|
||||||
overlay={closeSidebarTooltip}
|
title={
|
||||||
|
<FormattedMessage
|
||||||
|
id='rhs_header.closeSidebarTooltip'
|
||||||
|
defaultMessage='Close'
|
||||||
|
/>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
id='rhsCloseButton'
|
id='rhsCloseButton'
|
||||||
@@ -85,7 +79,7 @@ const Header = ({channel, isArchived, isMobile, onClose}: Props) => {
|
|||||||
className='icon icon-close'
|
className='icon icon-close'
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user