File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,30 @@ export default class FileUpload extends Component {
4646 this . setState ( { files : files } ) ;
4747 } ;
4848
49+ openDropZone = ( ) => {
50+ this . refs . dropzone . open ( ) ;
51+ } ;
52+
4953 render ( ) {
50- let { files } = this . state ;
54+ let { files, disableClick } = this . state ;
5155
5256 const attachmentStyle = {
5357 marginTop : "6px" ,
5458 color : "#616161"
5559 } ;
5660
5761 const messageContainerStyle = {
58- marginTop : "6px "
62+ marginTop : "10px "
5963 } ;
6064
6165 const messageStyle = {
6266 textAlign : "center" ,
6367 color : "#616161"
6468 } ;
6569
66- let rowStyle = { } ;
70+ let rowStyle = {
71+ padding : "0px"
72+ } ;
6773
6874 if ( files ) {
6975 rowStyle = {
@@ -80,10 +86,10 @@ export default class FileUpload extends Component {
8086 </ div >
8187 </ Col >
8288 < Col xs = { 10 } md = { 10 } >
83- < DropZone onDrop = { this . onDrop } >
89+ < DropZone ref = "dropzone" onDrop = { this . onDrop } disableClick >
8490 < div style = { messageContainerStyle } >
8591 < p style = { messageStyle } >
86- < Glyphicon glyph = "cloud-upload" /> Drop files to attach, or < a > browse</ a >
92+ < Glyphicon glyph = "cloud-upload" /> Drop files to attach, or < a onClick = { this . openDropZone } > browse</ a >
8793 </ p >
8894 </ div >
8995 < div style = { rowStyle } >
You can’t perform that action at this time.
0 commit comments