Skip to content

Commit 77191d7

Browse files
author
jonisaa
committed
#2 Extracted inline styles to a style object
1 parent 8b6705c commit 77191d7

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/components/field/FileUpload.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,33 @@ export default class FileUpload extends Component {
4242
render() {
4343
let { files } = this.state;
4444

45+
//TODO Think how to manage styles correctly
46+
const styles = {
47+
titleDiv: {
48+
marginTop: "6px",
49+
color: "#616161"
50+
},
51+
div: {
52+
marginTop: "6px"
53+
},
54+
p: {
55+
textAlign: "center",
56+
color: "#616161"
57+
}
58+
};
59+
4560
return (
4661
<div>
4762
<Row>
4863
<Col xs={2} md={2}>
49-
<div style={{marginTop: "6px", color: "#616161"}}>
64+
<div style={styles.titleDiv}>
5065
<b>Attachment</b>
5166
</div>
5267
</Col>
5368
<Col xs={10} md={10}>
5469
<DropZone onDrop={this.onDrop}>
55-
<div style={{marginTop: "6px"}}>
56-
<p style={{textAlign: "center", color: "#616161"}}>
70+
<div style={styles.div}>
71+
<p style={styles.p}>
5772
<Glyphicon glyph="cloud-upload"/> Drop files to attach, or <a>browse</a>
5873
</p>
5974
</div>

0 commit comments

Comments
 (0)