Skip to content

Commit 98a9b63

Browse files
author
jonisaa
committed
#2 Keep on Fix over styles
1 parent 8408755 commit 98a9b63

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

src/components/common/DropZone.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export default class DropZone extends Component {
191191

192192
if (!className && !style && !activeStyle && !rejectStyle) {
193193
style = {
194+
width: 'auto',
194195
borderWidth: 1,
195196
borderColor: '#bdbdbd',
196197
borderStyle: 'dashed',

src/components/field/FileUpload.js

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { Component, PropTypes } from 'react';
22
import DropZone from '../common/DropZone';
33
import GlyphButton from '../common/GlyphButton';
44
import FileInfo from '../common/FileInfo';
5+
import { Grid, Col, Row } from 'react-bootstrap';
56

67
import fetch from 'isomorphic-fetch';
78

@@ -43,27 +44,32 @@ export default class FileUpload extends Component {
4344
render() {
4445
let { files } = this.state;
4546

46-
console.log("URL ---->> " + this.props.url);
4747
return (
4848
<div>
49-
<label>Files</label>
49+
<Row>
50+
<Col xs={2} md={2}>
51+
<p align="center">
52+
<b>Attachments</b>
53+
</p>
54+
</Col>
55+
<Col xs={10} md={10}>
56+
<DropZone onDrop={this.onDrop}>
57+
<div>
58+
<p>Drop files to attach, or <a>browse</a></p>
59+
<ul>{
60+
files.map((file, index) => (
61+
<FileInfo key={index} file={file}/>
62+
))
63+
}
64+
</ul>
65+
</div>
66+
</DropZone>
67+
</Col>
68+
</Row>
5069
<div>
51-
<DropZone onDrop={this.onDrop}>
52-
<div>
53-
Try dropping some files here, or click to select files to upload.
54-
</div>
55-
<ul>{
56-
files.map((file, index) => (
57-
<FileInfo key={index} file={file}/>
58-
))
59-
}
60-
</ul>
61-
</DropZone>
62-
<div>
63-
<button onClick={this.onClick}>
64-
Upload
65-
</button>
66-
</div>
70+
<span>
71+
<GlyphButton glyph="cloud-upload" text="Upload" bsSize="primary" onClick={this.onClick}/>
72+
</span>
6773
</div>
6874
</div>
6975
);

0 commit comments

Comments
 (0)