-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movie.cjsx
47 lines (43 loc) · 1.39 KB
/
Movie.cjsx
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
import React from 'react'
import Button from 'antd/lib/Button'
import Rate from 'components/Rate'
import Viewed from 'components/Viewed'
import classNames from 'classnames'
import Play from 'react-icons/fa/play'
import ImageLoader from 'components/ImageLoader'
import styles from './styles'
Movie = ({ id, title, thumbnail, viewed, markViewed, rating, genre, progress, other }) ->
<div className={styles.container}>
<div className={styles.media}>
<div>
<ImageLoader src={thumbnail} className={styles.thumbnail}/>
</div>
<div className={styles.overlayContainer}>
<button className={styles.playButton}>
<Play />
</button>
</div>
</div>
<div>
<div className={styles.body}>
<div>
<h3 className={styles.title}>{title}</h3>
</div>
<div>
<span className={classNames(styles.genre, {"#{styles.hidden}": !genre.length})}>
{if genre.length then genre.join(', ') else '.'}
</span>
</div>
<div className={styles.data}>
<div>
<Rate disabled allowHalf value={rating} className={styles.rate}/>
</div>
<div>
<Viewed viewed={viewed} onToggle={markViewed} id={id} />
</div>
</div>
</div>
<div className={styles.progress} style={{width: "#{progress}%"}}/>
</div>
</div>
export default Movie