-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathBook.js
35 lines (31 loc) · 851 Bytes
/
Book.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
import React, {PropTypes} from 'react'
import RaisedButton from 'material-ui/RaisedButton';
import {
TableRow,
TableRowColumn,
} from 'material-ui/Table'
const style = {
margin: 12,
};
const Book = ({book, editBook}) => {
return(
<TableRow>
<TableRowColumn><strong>{book.title}</strong></TableRowColumn>
<TableRowColumn>
<RaisedButton
label="Edit"
labelPosition="before"
primary={true}
icon={<i className="material-icons">mode_edit</i>}
style={style}
onTouchTap={() => { editBook(book) }}
/>
</TableRowColumn>
</TableRow>
)
}
Book.propTypes = {
book: PropTypes.object,
editBook: PropTypes.func,
}
export default Book