[MM-58514] Migrate tooltips of "components/channel_members_rhs/header.tsx" to WithTooltip (#27241)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9bf07437cf
Коммит
3a890e1c90
@@ -7,10 +7,7 @@ import styled from 'styled-components';
|
||||
|
||||
import type {Channel} from '@mattermost/types/channels';
|
||||
|
||||
import OverlayTrigger from 'components/overlay_trigger';
|
||||
import Tooltip from 'components/tooltip';
|
||||
|
||||
import Constants from 'utils/constants';
|
||||
import WithTooltip from 'components/with_tooltip';
|
||||
|
||||
interface Props {
|
||||
channel: Channel;
|
||||
@@ -27,15 +24,6 @@ const HeaderTitle = styled.span`
|
||||
const Header = ({channel, canGoBack, onClose, goBack}: Props) => {
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const closeSidebarTooltip = (
|
||||
<Tooltip id='closeSidebarTooltip'>
|
||||
<FormattedMessage
|
||||
id='rhs_header.closeSidebarTooltip'
|
||||
defaultMessage='Close'
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='sidebar--right__header'>
|
||||
<span className='sidebar--right__title'>
|
||||
@@ -68,10 +56,15 @@ const Header = ({channel, canGoBack, onClose, goBack}: Props) => {
|
||||
}
|
||||
</span>
|
||||
|
||||
<OverlayTrigger
|
||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
||||
<WithTooltip
|
||||
id='closeSidebarTooltip'
|
||||
placement='top'
|
||||
overlay={closeSidebarTooltip}
|
||||
title={
|
||||
<FormattedMessage
|
||||
id='rhs_header.closeSidebarTooltip'
|
||||
defaultMessage='Close'
|
||||
/>
|
||||
}
|
||||
>
|
||||
<button
|
||||
id='rhsCloseButton'
|
||||
@@ -84,7 +77,7 @@ const Header = ({channel, canGoBack, onClose, goBack}: Props) => {
|
||||
className='icon icon-close'
|
||||
/>
|
||||
</button>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user