File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed
__tests__/components/editor Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,9 @@ describe('<ImportFileZone />', () => {
1313 const reloadEditor = jest . fn ( )
1414 let wrapper = shallow ( < ImportFileZone reloadEditor = { reloadEditor } /> )
1515
16- it ( 'Has a div with headings' , ( ) => {
17- expect ( wrapper . find ( 'div > h3' ) . text ( ) ) . toEqual ( 'Import a Template' )
18- } )
19-
20- it ( 'has an upload button' , async ( ) => {
16+ it ( 'has an upload button' , ( ) => {
2117 expect ( wrapper . find ( 'button#ImportProfile' ) . exists ( ) ) . toBeTruthy ( )
18+ expect ( wrapper . find ( 'button#ImportProfile' ) . text ( ) ) . toEqual ( 'Import New or Revised Resource Template' )
2219 } )
2320
2421 it ( 'has a link to the default resource template' , ( ) => {
Original file line number Diff line number Diff line change @@ -161,16 +161,21 @@ class ImportFileZone extends Component {
161161
162162 render ( ) {
163163 let importFileZone = {
164- border : '1px dotted' ,
165- float : 'left' ,
166- padding : '20px' ,
164+ display : 'flex' ,
165+ justifyContent : 'center' ,
166+ padding : '40px'
167+ }
168+ let dropzoneContainer = {
169+ display : 'flex' ,
170+ justifyContent : 'center'
167171 }
168172 return (
169173 < section >
170174 < div className = "ImportFileZone" style = { importFileZone } >
171- < h3 > Import a Template</ h3 >
172175 < div > < Link to = "/editor" onClick = { ( ) => { this . reloadEditor ( ) } } > { this . props . defaultRtId } </ Link > </ div >
173- < button id = "ImportProfile" className = "btn btn-primary btn-small" onClick = { this . handleClick } > Import</ button >
176+ < button id = "ImportProfile" className = "btn btn-primary btn-lg" onClick = { this . handleClick } > Import New or Revised Resource Template</ button >
177+ </ div >
178+ < div className = "dropzoneContainer" style = { dropzoneContainer } >
174179 { this . state . showDropZone ? < DropZone showDropZoneCallback = { this . updateShowDropZone } dropFileCallback = { this . onDropFile } filesCallback = { this . state . files } /> : null }
175180 </ div >
176181 </ section >
@@ -180,6 +185,12 @@ class ImportFileZone extends Component {
180185
181186class DropZone extends Component {
182187 render ( ) {
188+ let fileName = {
189+ fontSize : '18px'
190+ }
191+ let listStyle = {
192+ listStyleType : 'none'
193+ }
183194 return (
184195 < section >
185196 < br /> < p > Drop resource template file < br />
@@ -191,9 +202,9 @@ class DropZone extends Component {
191202 >
192203 </ Dropzone >
193204 < aside >
194- < h4 > Loaded resource template file:</ h4 >
195- < ul >
196- { this . props . filesCallback . map ( f => < li key = { f . name } > { f . name } - { f . size } bytes</ li > ) }
205+ < h5 > Loaded resource template file:</ h5 >
206+ < ul style = { listStyle } >
207+ { this . props . filesCallback . map ( f => < li style = { fileName } key = { f . name } > { f . name } - { f . size } bytes</ li > ) }
197208 </ ul >
198209 </ aside >
199210 </ div >
You can’t perform that action at this time.
0 commit comments