-
Notifications
You must be signed in to change notification settings - Fork 342
/
page-result-item.tsx
63 lines (58 loc) · 2.39 KB
/
page-result-item.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import React, { PureComponent } from 'react'
import cx from 'classnames'
import ResultItemActions from './result-item-actions'
import { Props } from './result-item'
const styles = require('./result-item.css')
class PageResultItem extends PureComponent<Omit<Props, 'goToAnnotation'>> {
static defaultProps = {
nullImg: '/img/null-icon.png',
}
render() {
return (
<React.Fragment>
<div
className={cx(styles.infoContainer, {
[styles.infoContainerOverview]: this.props.isOverview,
})}
>
<div className={styles.firstlineContainer}>
<div className={styles.titleContainer}>
<div className={styles.favIconContainer}>
{this.props.favIcon ? (
<img
className={styles.favIcon}
src={this.props.favIcon}
/>
) : (
<div className={styles.noFavicon}>{''}</div>
)}
</div>
<div
title={this.props.title}
className={styles.title}
>
{this.props.title}
</div>
</div>
<div className={styles.actionItems}>
<ResultItemActions {...this.props} />
</div>
</div>
<div title={this.props.url} className={styles.url}>
{this.props.url}
</div>
<div className={styles.bottomLine}>
<div className={styles.detailsBox}>
<div className={styles.displayTime}>
{' '}
{this.props.displayTime}
</div>
</div>
</div>
{this.props.tags.length > 0 ? this.props.tagHolder : null}
</div>
</React.Fragment>
)
}
}
export default PageResultItem