11import React , { Component , PropTypes } from 'react' ;
2- import { Col } from 'react-bootstrap' ;
2+ import { Col , Glyphicon } from 'react-bootstrap' ;
33import filesize from 'filesize' ;
44
55export default class FileUploadItem extends Component {
@@ -16,7 +16,7 @@ export default class FileUploadItem extends Component {
1616 } ;
1717
1818 render ( ) {
19- let { file, height, width } = this . props ;
19+ let { file, height, width, onClick } = this . props ;
2020
2121 const containerStyle = {
2222 margin : "auto" ,
@@ -38,6 +38,12 @@ export default class FileUploadItem extends Component {
3838 paddingRight : "10px"
3939 } ;
4040
41+ const glyphSizeStyle = {
42+ textAlign : 'left' ,
43+ paddingLeft : "10px" ,
44+ paddingBottom : "10px"
45+ } ;
46+
4147 const imgStyle = {
4248 marginTop : "10px" ,
4349 display : 'block' ,
@@ -57,9 +63,12 @@ export default class FileUploadItem extends Component {
5763 < Col xs = { 4 } md = { 4 } >
5864 < div style = { containerStyle } >
5965 < img height = { height } width = { width } src = { image } style = { imgStyle } />
60- < div style = { textContainerStyle } >
66+ < div style = { textContainerStyle } onClick = { onClick } >
6167 < p style = { fileNameStyle } > { filename } </ p >
62- < p style = { fileSizeStyle } > { filesize ( file . size ) } </ p >
68+ < p style = { fileSizeStyle } >
69+ < Glyphicon glyph = "trash" />
70+ { " " + filesize ( file . size ) }
71+ </ p >
6372 </ div >
6473 </ div >
6574 </ Col >
0 commit comments