[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 * as GlobalActions from 'actions/global_actions';
|
||||||
|
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
|
||||||
import Timestamp, {RelativeRanges} from 'components/timestamp';
|
import Timestamp, {RelativeRanges} from 'components/timestamp';
|
||||||
import Tooltip from 'components/tooltip';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
|
|
||||||
import {Locations} from 'utils/constants';
|
import {Locations} from 'utils/constants';
|
||||||
import {isMobile} from 'utils/user_agent';
|
import {isMobile} from 'utils/user_agent';
|
||||||
@@ -94,25 +93,20 @@ export default class PostTime extends React.PureComponent<Props> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
delayShow={500}
|
|
||||||
placement='top'
|
placement='top'
|
||||||
overlay={
|
id={eventTime.toString()}
|
||||||
<Tooltip
|
title={
|
||||||
id={eventTime.toString()}
|
<Timestamp
|
||||||
className='hidden-xs'
|
value={eventTime}
|
||||||
>
|
ranges={POST_TOOLTIP_RANGES}
|
||||||
<Timestamp
|
useSemanticOutput={false}
|
||||||
value={eventTime}
|
useTime={getTimeFormat}
|
||||||
ranges={POST_TOOLTIP_RANGES}
|
/>
|
||||||
useSemanticOutput={false}
|
|
||||||
useTime={getTimeFormat}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user