@@ -41,44 +41,60 @@ class BookDetails extends Component {
41
41
42
42
render ( ) {
43
43
const book = { ...this . state . book } ;
44
- console . log ( this . props ) ;
45
- return (
46
- < div className = 'container' style = { { boxSizing :"border-box" , height :"100vh" , padding :"10px 40px" } } >
47
- < div className = "card justify-content-center align-items-center"
48
- style = { { display :'' , alignContent :"center" , margin :"5px" , padding : "40px 60px" , boxSizing :"border-box" , height :"80%" , width :"60%" } } >
49
- < img className = "card-img-top " src = { book . image } alt = "Card cap" style = { { boxSizing :"border-box" , height :"50%" , width :"40%" } } />
50
-
51
- < div className = "card-body" style = { { boxSizing :"border-box" } } >
52
- < h5 className = "card-title" > { book . title } </ h5 >
53
- < div className = "card-text" >
54
- < div >
55
- < p > description: { book . description . slice ( 0 , 70 ) } </ p >
56
- < div >
57
- < span > < p style = { { display :"inline" } } > publisher { book . publisher } </ p > </ span >
58
- < span > < p style = { { display :"inline" , paddingLeft :"30px" } } > page Count: { book . pageCount } </ p > </ span >
59
- </ div >
60
- < div >
61
- < p style = { { display :"inline" } } > authors: { book . authors } </ p >
62
- < p style = { { display :"inline" , marginLeft :"35px" , paddingLeft : "90px" } } > categories: { book . categories } </ p >
63
- </ div >
64
- < p style = { { display :"inline" } } > language: { book . language } </ p >
44
+ return < div className = 'container' >
45
+ < div className = "row d-flex justify-content-center m-3 p-3 bg-light" >
46
+ < div className = "row col-md-6" >
47
+ < h5 className = "card-title bd-title" style = { { fontSize :"calc(1.425rem + 2.1vw)" , fontWeight :"bold" } } > { book . title } </ h5 >
48
+ < div className = "card-text row" >
49
+ < div className = "" >
50
+ < p > description: { book . description . slice ( 0 , 250 ) } </ p >
51
+ < div className = 'd-flex justify-content-between pt-4' >
52
+ < span >
53
+ < p >
54
+ publisher { book . publisher }
55
+ </ p >
56
+ </ span >
57
+ < span >
58
+ < p >
59
+ page Count: { book . pageCount }
60
+ </ p >
61
+ </ span >
62
+ </ div >
63
+ < div className = 'd-flex justify-content-between pr-1' >
64
+ < p >
65
+ authors: { book . authors }
66
+ </ p >
67
+ < p >
68
+ categories: { book . categories }
69
+ </ p >
70
+ </ div >
71
+ < p style = { { display : "inline" } } >
72
+ language: { book . language }
73
+ </ p >
65
74
</ div >
75
+ </ div >
76
+ < div className = "col-1" />
66
77
</ div >
67
- < div className = "book-shelf-changer" >
68
- { console . log ( book . shelf ) }
69
- < select onChange = { ( ev ) => this . props . onUpdateBookShelf ( ev . target . value , book ) } defaultValue = { `${ book . shelf } ` } >
70
- < option value = "move" disabled >
71
- Move to...
72
- </ option >
73
- < option value = "currentlyReading" > Currently Reading</ option >
74
- < option value = "wantToRead" > Want to Read</ option >
75
- < option value = "read" > Read</ option >
76
- < option value = "none" > None</ option >
77
- </ select >
78
+ < div className = 'row col-5 d-flex justify-content-end align-items-end mb-5 pb-4' >
79
+ < div className = "d-absolute " style = { { } } >
80
+ < div className = 'd-flex align-items-center' >
81
+ < img className = "img-thumbnail" src = { book . image } alt = "Card cap" />
82
+ < div className = "book-shelf-changer d-absolute" >
83
+ < select onChange = { ( ev ) => this . props . onUpdateBookShelf ( ev . target . value , book ) } value = { book . shelf } >
84
+ < option value = "move" disabled >
85
+ Move to...
86
+ </ option >
87
+ < option value = "currentlyReading" > Currently Reading</ option >
88
+ < option value = "wantToRead" > Want to Read</ option >
89
+ < option value = "read" > Read</ option >
90
+ < option value = "none" > None</ option >
91
+ </ select >
92
+ </ div >
93
+ </ div >
94
+ </ div >
78
95
</ div >
79
- </ div >
80
96
</ div >
81
- </ div > ) ;
97
+ </ div >
82
98
}
83
99
}
84
100
0 commit comments