Skip to content

Commit fc74918

Browse files
author
jonisaa
committed
#2 Updating styles on FileInfo
1 parent 6bda429 commit fc74918

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/components/common/FileInfo.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,35 @@ export default class FileUploadItem extends Component {
3030
image = <img height={height} width={width} src={file.preview} style={imgStyle}/>;
3131
}
3232

33+
//TODO truncate fileName to keep the Col in the same height
34+
const containerStyle = {
35+
backgroundColor: "#e0e0e0",
36+
paddingTop: "10px",
37+
paddingBottom: "10px"
38+
};
39+
40+
const fileNameStyle = {
41+
textAlign: 'center'
42+
};
43+
44+
const fileSizeStyle = {
45+
textAlign: 'right',
46+
paddingRight: "10px"
47+
};
48+
3349
return (
3450
<Col xs={4} md={4}>
35-
<div style={{backgroundColor: "#e0e0e0"}}>
51+
<div style={containerStyle}>
3652
<div>
3753
{image}
3854
</div>
3955
<div>
40-
<p style={{textAlign: 'center'}}>
56+
<p style={fileNameStyle}>
4157
<a>{file.name}</a>
4258
</p>
43-
<p style={{textAlign: 'right'}}>{filesize(file.size)}</p>
59+
<p style={fileSizeStyle}>
60+
{filesize(file.size)}
61+
</p>
4462
</div>
4563
</div>
4664
</Col>

src/components/field/FileUpload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class FileUpload extends Component {
5959

6060
let rowStyle = {};
6161

62-
//TODO check row
62+
//TODO check row
6363
if (files) {
6464
rowStyle = {
6565
padding: "10px"

0 commit comments

Comments
 (0)