-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from hackforla/Scaffolding
Scaffolding for base project
- Loading branch information
Showing
23 changed files
with
282 additions
and
41 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,37 @@ | ||
import React from 'react'; | ||
import './App.css'; | ||
import TreeMapVis from './components/TreeMapVis/TreeMapVis.js'; | ||
import CandleStick from './components/CandleStick/CandleStick.js'; | ||
import PinMap from './components/PinMap/PinMap.jsx'; | ||
import HeatMap from './components/HeatMap/HeatMap.js'; | ||
import LoadingSpinner from './components/LoadingSpinner/LoadingSpinner.js'; | ||
import Header from './containers/Header/Header.jsx' | ||
import MapContainer from './containers/Map/MapContainer.jsx' | ||
import FrequencyContainer from './containers/Graphs/FrequencyContainer.jsx' | ||
import TimeToCloseContainer from './containers/Graphs/TimeToCloseContainer.jsx' | ||
// import TreeMapVis from './components/TreeMapVis/TreeMapVis.js'; | ||
// import CandleStick from './components/CandleStick/CandleStick.js'; | ||
// import PinMap from './components/PinMap/PinMap.jsx'; | ||
// import HeatMap from './components/HeatMap/HeatMap.js'; | ||
// import LoadingSpinner from './components/LoadingSpinner/LoadingSpinner.js'; | ||
|
||
|
||
class App extends React.Component{ | ||
constructor(props){ | ||
super(props); | ||
this.state = { | ||
selectedId: "TreeMapVis", | ||
loading:false | ||
} | ||
} | ||
|
||
handleMockSelected = (e) => { | ||
this.setState({selectedId: e.target.value}); | ||
} | ||
|
||
handleLoadingChanged = (loadingState) => { | ||
this.setState({loading:loadingState}); | ||
} | ||
|
||
render(){ | ||
const prototypeMap = { | ||
TreeMapVis: <TreeMapVis loadingChanged={this.handleLoadingChanged}/>, | ||
CandleStick: <CandleStick/>, | ||
PinMap: <PinMap loadingChanged={this.handleLoadingChanged} />, | ||
HeatMap:<HeatMap/> | ||
} | ||
|
||
return ( | ||
<div className="App" > | ||
{Object.keys(prototypeMap).map( proto => | ||
<div key={proto}> | ||
<input type="radio" name="prototypes" value={proto} onClick={this.handleMockSelected}/>{proto}<br/> | ||
</div> | ||
)} | ||
{ prototypeMap[this.state.selectedId] } | ||
{ this.state.loading && | ||
<LoadingSpinner/>} | ||
<Header/> | ||
<MapContainer/> | ||
<TimeToCloseContainer/> | ||
<FrequencyContainer/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import './Styles/Frequency.scss' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='Frequency'> | ||
<img className='FrequencyImg' src={process.env.PUBLIC_URL + '/frequency.svg'} alt='frequency'/> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.Frequency{ | ||
width: 100vw; | ||
height: 20vh; | ||
} | ||
|
||
.FrequencyImg{ | ||
width: 100%; | ||
height: 100%; | ||
object-fit: scale-down; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.TimeToClose{ | ||
width: auto; | ||
height: 60vh; | ||
} | ||
|
||
.TimeToCloseImg{ | ||
width: 80%; | ||
height: 80%; | ||
object-fit: scale-down; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import './Styles/TimeToClose.scss' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='TimeToClose'> | ||
<img className='TimeToCloseImg' src={process.env.PUBLIC_URL + '/timetoclose.svg'} alt="timetoclose"/> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import './Styles/NCFilter.scss' | ||
import constants from '../common/CONSTANTS.js'; | ||
|
||
export default ({ | ||
isPrimary, | ||
selectedNC, | ||
onChange | ||
}) => { | ||
|
||
const style = isPrimary === true ? 'NCFilterPrimary' : 'NCFilterSecondary' | ||
return ( | ||
<div className={style}> | ||
<select className="NCFilterDropdown" onChange={onChange}> | ||
{constants.COUNCILS.map((nc, idx) => (<option key={nc} value={nc}>{nc}</option>))} | ||
</select> | ||
</div> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
src/components/TreeMapVis/Styles/Legend.scss → src/components/common/Styles/Legend.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.Legend{ | ||
width: 100%; | ||
|
||
float: left; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.NCFilterPrimary{ | ||
width: 50vw; | ||
overflow:hidden; | ||
white-space:nowrap; | ||
text-overflow:ellipsis; | ||
float: left; | ||
} | ||
|
||
.NCFilterSecondary{ | ||
width: 50vw; | ||
overflow:hidden; | ||
white-space:nowrap; | ||
text-overflow:ellipsis; | ||
float: right; | ||
} |
2 changes: 1 addition & 1 deletion
2
...omponents/TreeMapVis/Tests/Legend.test.js → src/components/common/Tests/Legend.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import './Styles/FrequencyContainer.scss' | ||
import Frequency from '../../components/Frequency/Frequency.jsx' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='FrequencyContainer'> | ||
<Frequency/> | ||
</div>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.FrequencyContainer{ | ||
width: 100vw; | ||
height: 20vh; | ||
float: left; | ||
outline-style: dotted; | ||
outline-width: thin; | ||
outline-color: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.TimeToCloseContainer{ | ||
width: 40vw; | ||
height: 60vh; | ||
float: left; | ||
outline-style: dotted; | ||
outline-width: thin; | ||
outline-color: yellow; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import './Styles/TimeToCloseContainer.scss' | ||
import TimeToClose from '../../components/TimeToClose/TimeToClose.jsx' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='TimeToCloseContainer'> | ||
<TimeToClose/> | ||
</div>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react' | ||
import './Styles/Header.scss' | ||
import NCFilter from '../../components/common/NCFilter.jsx' | ||
import DataPicker from '../../components/common/dataPicker.jsx' | ||
import Legend from '../../components/common/Legend.jsx' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='Header'> | ||
<NCFilter isPrimary={true}/> | ||
<NCFilter isPrimary={false}/> | ||
<DataPicker/> | ||
<Legend/> | ||
</div>) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.Header { | ||
width: 100vw; | ||
height: 20vh; | ||
float: left; | ||
outline-style: dotted; | ||
outline-width: thin; | ||
outline-color: blue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import './Styles/MapContainer.scss' | ||
import PinMap from '../../components/PinMap/PinMap.jsx' | ||
|
||
export default ({}) => { | ||
return ( | ||
<div className='MapContainer'> | ||
<PinMap/> | ||
</div>) | ||
} |
Oops, something went wrong.