File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,31 @@ export default class FileUploadItem extends Component {
1818 render ( ) {
1919 let { file, height, width } = this . props ;
2020
21+ const imgStyle = {
22+ display : 'block' ,
23+ marginLeft : 'auto' ,
24+ marginRight : 'auto'
25+ } ;
26+
2127 let image = null ;
2228
2329 if ( file . type . match ( / i m a g e / ) ) {
24- image = < img height = { height } width = { width } src = { file . preview } /> ;
30+ image = < img height = { height } width = { width } src = { file . preview } style = { imgStyle } /> ;
2531 }
2632
2733 return (
2834 < Col xs = { 4 } md = { 4 } >
29- { image }
30- < p > { file . name } </ p >
31- < p > { filesize ( file . size ) } </ p >
35+ < div style = { { backgroundColor : "#e0e0e0" } } >
36+ < div >
37+ { image }
38+ </ div >
39+ < div >
40+ < p style = { { textAlign : 'center' } } >
41+ < a > { file . name } </ a >
42+ </ p >
43+ < p style = { { textAlign : 'right' } } > { filesize ( file . size ) } </ p >
44+ </ div >
45+ </ div >
3246 </ Col >
3347 ) ;
3448 }
You can’t perform that action at this time.
0 commit comments