-
Notifications
You must be signed in to change notification settings - Fork 0
/
BooksList.js
39 lines (32 loc) · 1.55 KB
/
BooksList.js
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
import React, { Component } from 'react';
class BooksList extends Component{
render() {
//console.log(this.props.books)
return (
<ol className="books-grid">
{this.props.books.map((book) =>
<li key={book.id}>
<div className="book">
<div className="book-top">
<div className="book-cover" style={{ width: 128, height: 193, backgroundImage: `url(${book.imageLinks.thumbnail})` }}></div>
<div className="book-shelf-changer">
<select onChange={() => this.props.onUpdateBookList(book)}>
<option value="none" disabled>Move to...</option>
<option value="currentlyReading">Currently Reading</option>
<option value="wantToRead">Want to Read</option>
<option value="read">Read</option>
<option value="none">None</option>
</select>
</div>
</div>
<div className="book-title">{book.title}</div>
<div className='book-subtitle'>{book.subtitle}</div>
<div className="book-authors">{book.authors}</div>
</div>
</li>
)}
</ol>
)
}
}
export default BooksList