File tree Expand file tree Collapse file tree 2 files changed +16
-27
lines changed
src/routes/Zen/components Expand file tree Collapse file tree 2 files changed +16
-27
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
22import PropTypes from 'prop-types'
3- import './Zen.scss'
43import Spinner from 'react-spinkit'
54import { Button } from 'reactstrap'
65
@@ -11,26 +10,23 @@ Zen.propTypes = {
1110}
1211
1312function Zen ( { fetchZen, clearZen, zen : { fetching, text } } ) {
14- return ( < div >
15- < div className = "loading" >
16- { fetching
17- ? < Spinner name = "cube-grid" color = "purple" /> : ''
18- }
19- </ div >
13+ return (
2014 < div >
21- < Button color = "success" onClick = { fetchZen } >
22- { fetching ? 'Fetching...' : 'Fetch' }
23- </ Button >
24- { ' ' }
25- < Button color = "danger" onClick = { clearZen } > Clear</ Button >
26- </ div >
27- < hr />
28- < div >
29- { text . map ( item => (
30- < p key = { item . id } > { item . text } </ p >
31- ) ) }
32- </ div >
33- </ div > )
15+ { fetching && < Spinner name = "cube-grid" color = "purple" style = { { margin : 'auto' } } /> }
16+ < div style = { { marginTop : '20px' } } >
17+ < Button color = "success" onClick = { fetchZen } >
18+ { fetching ? 'Fetching...' : 'Fetch' }
19+ </ Button >
20+ { ' ' }
21+ < Button color = "danger" onClick = { clearZen } > Clear</ Button >
22+ </ div >
23+ < hr />
24+ < div >
25+ { text . map ( item => (
26+ < p key = { item . id } > { item . text } </ p >
27+ ) ) }
28+ </ div >
29+ </ div > )
3430}
3531
3632export default Zen
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments