mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-59901] Migrate tooltips of 'components/file_search_results/file_search_result_item.tsx' to WithTooltip (#27836)
This commit is contained in:
parent
c3875d3fe7
commit
e776aa8956
@ -75,23 +75,10 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={1000}
|
||||
overlay={
|
||||
<Tooltip
|
||||
id="file-name__tooltip"
|
||||
>
|
||||
Download
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id="file-name__tooltip"
|
||||
placement="top"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
title="Download"
|
||||
>
|
||||
<a
|
||||
className="action-icon download-icon"
|
||||
@ -102,7 +89,7 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
className="icon icon-download-outline"
|
||||
/>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
@ -191,23 +178,10 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={1000}
|
||||
overlay={
|
||||
<Tooltip
|
||||
id="file-name__tooltip"
|
||||
>
|
||||
Download
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id="file-name__tooltip"
|
||||
placement="top"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
title="Download"
|
||||
>
|
||||
<a
|
||||
className="action-icon download-icon"
|
||||
@ -218,7 +192,7 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
className="icon icon-download-outline"
|
||||
/>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
@ -307,23 +281,10 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={1000}
|
||||
overlay={
|
||||
<Tooltip
|
||||
id="file-name__tooltip"
|
||||
>
|
||||
Download
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id="file-name__tooltip"
|
||||
placement="top"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
title="Download"
|
||||
>
|
||||
<a
|
||||
className="action-icon download-icon"
|
||||
@ -334,7 +295,7 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
className="icon icon-download-outline"
|
||||
/>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
@ -418,23 +379,10 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={1000}
|
||||
overlay={
|
||||
<Tooltip
|
||||
id="file-name__tooltip"
|
||||
>
|
||||
Download
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id="file-name__tooltip"
|
||||
placement="top"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
title="Download"
|
||||
>
|
||||
<a
|
||||
className="action-icon download-icon"
|
||||
@ -445,7 +393,7 @@ exports[`components/file_search_result/FileSearchResultItem should match snapsho
|
||||
className="icon icon-download-outline"
|
||||
/>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
@ -8,12 +8,11 @@ import {getFileDownloadUrl} from 'mattermost-redux/utils/file_utils';
|
||||
|
||||
import FileThumbnail from 'components/file_attachment/file_thumbnail';
|
||||
import FilePreviewModal from 'components/file_preview_modal';
|
||||
import OverlayTrigger from 'components/overlay_trigger';
|
||||
import Timestamp, {RelativeRanges} from 'components/timestamp';
|
||||
import Tooltip from 'components/tooltip';
|
||||
import Menu from 'components/widgets/menu/menu';
|
||||
import MenuWrapper from 'components/widgets/menu/menu_wrapper';
|
||||
import Tag from 'components/widgets/tag/tag';
|
||||
import WithTooltip from 'components/with_tooltip';
|
||||
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import Constants, {ModalIdentifiers} from 'utils/constants';
|
||||
@ -146,14 +145,10 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
</div>
|
||||
</div>
|
||||
{this.props.fileInfo.post_id && (
|
||||
<OverlayTrigger
|
||||
delayShow={1000}
|
||||
placement='top'
|
||||
overlay={
|
||||
<Tooltip id='file-name__tooltip'>
|
||||
{localizeMessage('file_search_result_item.more_actions', 'More Actions')}
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id='file-name__tooltip'
|
||||
title={localizeMessage('file_search_result_item.more_actions', 'More Actions')}
|
||||
placement={'top'}
|
||||
>
|
||||
<MenuWrapper
|
||||
onToggle={this.keepOpen}
|
||||
@ -182,16 +177,12 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
{this.renderPluginItems()}
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
)}
|
||||
<OverlayTrigger
|
||||
delayShow={1000}
|
||||
placement='top'
|
||||
overlay={
|
||||
<Tooltip id='file-name__tooltip'>
|
||||
{localizeMessage('file_search_result_item.download', 'Download')}
|
||||
</Tooltip>
|
||||
}
|
||||
<WithTooltip
|
||||
id='file-name__tooltip'
|
||||
title={localizeMessage('file_search_result_item.download', 'Download')}
|
||||
placement={'top'}
|
||||
>
|
||||
<a
|
||||
className='action-icon download-icon'
|
||||
@ -200,7 +191,7 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
>
|
||||
<i className='icon icon-download-outline'/>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</WithTooltip>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user