[MM-60164] Migrate tooltips of 'components/post_view/post_time/post_time.tsx' to WithTooltip (#27953)

Этот коммит содержится в:
Zubair Imtiaz
2024-08-13 19:58:11 +05:00
коммит произвёл 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={
<Tooltip
id={eventTime.toString()} id={eventTime.toString()}
className='hidden-xs' title={
>
<Timestamp <Timestamp
value={eventTime} value={eventTime}
ranges={POST_TOOLTIP_RANGES} ranges={POST_TOOLTIP_RANGES}
useSemanticOutput={false} useSemanticOutput={false}
useTime={getTimeFormat} useTime={getTimeFormat}
/> />
</Tooltip>
} }
> >
{content} {content}
</OverlayTrigger> </WithTooltip>
); );
} }
} }