[MM-60164] Migrate tooltips of 'components/post_view/post_time/post_time.tsx' to WithTooltip (#27953)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8465f6da2b
Коммит
1c68aa2dbf
@@ -7,9 +7,8 @@ import {Link} from 'react-router-dom';
|
||||
|
||||
import * as GlobalActions from 'actions/global_actions';
|
||||
|
||||
import OverlayTrigger from 'components/overlay_trigger';
|
||||
import Timestamp, {RelativeRanges} from 'components/timestamp';
|
||||
import Tooltip from 'components/tooltip';
|
||||
import WithTooltip from 'components/with_tooltip';
|
||||
|
||||
import {Locations} from 'utils/constants';
|
||||
import {isMobile} from 'utils/user_agent';
|
||||
@@ -94,25 +93,20 @@ export default class PostTime extends React.PureComponent<Props> {
|
||||
);
|
||||
|
||||
return (
|
||||
<OverlayTrigger
|
||||
delayShow={500}
|
||||
<WithTooltip
|
||||
placement='top'
|
||||
overlay={
|
||||
<Tooltip
|
||||
id={eventTime.toString()}
|
||||
className='hidden-xs'
|
||||
>
|
||||
<Timestamp
|
||||
value={eventTime}
|
||||
ranges={POST_TOOLTIP_RANGES}
|
||||
useSemanticOutput={false}
|
||||
useTime={getTimeFormat}
|
||||
/>
|
||||
</Tooltip>
|
||||
id={eventTime.toString()}
|
||||
title={
|
||||
<Timestamp
|
||||
value={eventTime}
|
||||
ranges={POST_TOOLTIP_RANGES}
|
||||
useSemanticOutput={false}
|
||||
useTime={getTimeFormat}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{content}
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user