Skip to content

Commit 55baaba

Browse files
committed
merged with dev
2 parents 431627e + c3931b9 commit 55baaba

File tree

11 files changed

+2146
-2155
lines changed

11 files changed

+2146
-2155
lines changed

package-lock.json

Lines changed: 2105 additions & 2124 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/components/Tree.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import JSONTree from 'react-json-tree';
33

44
const getItemString = (type, data, itemType, itemString) => (
55
<span>
6-
//
7-
{type}
6+
{/* //
7+
{type} */}
88
</span>
99
);
1010

@@ -18,7 +18,10 @@ const Tree = (props) => {
1818
<JSONTree
1919
data={snapshot}
2020
theme={{ tree: () => ({ className: 'json-tree' }) }}
21+
shouldExpandNode={() => true}
2122
getItemString={getItemString}
23+
// labelRenderer={raw => <strong>{raw}</strong>}
24+
// valueRenderer={raw => <em>{raw}</em>}
2225
/>
2326
)}
2427
</React.Fragment>

src/app/containers/ActionContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const ActionContainer = ({
2727
}
2828
return (
2929
<div className="action-container">
30-
<div className="action-component">
30+
<div className="action-component exclude">
3131
<div className="empty-button" onClick={emptySnapshot}>
3232
emptySnapshot
3333
</div>

src/app/containers/HeadContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
const HeadContainer = () => (
4-
<div className="head-container">HeadContainer</div>
4+
<div className="head-container" />
55
);
66

77
export default HeadContainer;

src/app/containers/StateContainer.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import React from 'react';
2-
import { MemoryRouter as Router, Route, NavLink } from 'react-router-dom';
32
import PropTypes from 'prop-types';
3+
import {
4+
MemoryRouter as Router, Route, NavLink, Switch,
5+
} from 'react-router-dom';
46
import Tree from '../components/Tree';
57
import Chart from '../components/Chart';
68

79
const StateContainer = ({ snapshot }) => (
810
<Router>
911
<div className="state-container">
1012
<div className="navbar">
11-
<NavLink className="router-link" activeClassName="is-active" to="/tree">
13+
<NavLink className="router-link" activeClassName="is-active" to="/">
1214
Tree
1315
</NavLink>
1416
<NavLink className="router-link" activeClassName="is-active" to="/chart">
1517
Chart
1618
</NavLink>
1719
</div>
18-
<Route path="/tree" render={() => <Tree snapshot={snapshot} />} />
19-
<Route path="/chart" render={() => <Chart snapshot={snapshot} />} />
20+
<Switch>
21+
<Route path="/chart" render={() => <Chart snapshot={snapshot} />} />
22+
<Route path="/" render={() => <Tree snapshot={snapshot} />} />
23+
</Switch>
2024
</div>
2125
</Router>
2226
);

src/app/styles/abstracts/_variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ $light-grey-three: rgb(101, 104, 110) !default;
2121
/// @type Color
2222
$navbar-color: rgb(68, 72, 78) !default;
2323

24+
/// @type Color
25+
$head-color: #353b46 !default;
26+
2427
/// @type Color
2528
$border-color: rgba(190, 190, 190, 0.5) !default;
2629

src/app/styles/components/_actionComponent.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@
1616
background-color: $light-grey-one;
1717
}
1818

19-
.action-component button {
20-
position: relative;
19+
.action-component .empty-button {
20+
// grid-column: 1 / span 4;
2121
}
2222

2323
.action-component:hover .jump-button {
2424
visibility: visible;
2525
}
26+
27+
.action-component.exclude {
28+
display: flex;
29+
justify-content: center;
30+
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.json-tree {
2-
position: absolute;
32
margin: 10px;
43
padding: 0;
54
background-color: $brand-color;
65
list-style: none;
7-
// overflow: hidden;
86
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.head-container {
2+
height: 5%;
3+
background-color: $head-color;
4+
}

src/app/styles/main.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
@import 'base/base', 'base/fonts', 'base/helpers', 'base/typography';
88

99
// 4. Layout-related sections
10-
@import 'layout/actionContainer', 'layout/stateContainer', 'layout/travelContainer', 'layout/buttonsContainer';
10+
@import 'layout/actionContainer', 'layout/stateContainer',
11+
'layout/travelContainer', 'layout/buttonsContainer',
12+
'layout/headContainer.scss';
1113

1214
// 5. Components
1315
@import 'components/buttons', 'components/actionComponent',

0 commit comments

Comments
 (0)