Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 9b5f773

Browse files
committed
Fix build and change base color for theme
1 parent cb31350 commit 9b5f773

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

.babelrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"plugins": ["transform-react-jsx"],
3-
"presets": ["es2015", "stage-0"]
2+
"presets": ["es2015-loose", "stage-0", "react"]
43
}

package.json

+13-9
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,28 @@
2727
},
2828
"homepage": "https://github.com/romseguy/redux-devtools-chart-monitor",
2929
"devDependencies": {
30-
"babel-cli": "^6.1.2",
31-
"babel-core": "^6.1.2",
32-
"babel-eslint": "^4.1.4",
33-
"babel-loader": "^6.0.1",
34-
"babel-plugin-transform-react-jsx": "^6.0.18",
35-
"babel-preset-es2015": "^6.1.2",
36-
"babel-preset-stage-0": "^6.1.2",
30+
"babel-cli": "^6.3.15",
31+
"babel-core": "^6.1.20",
32+
"babel-eslint": "^5.0.0-beta4",
33+
"babel-loader": "^6.2.0",
34+
"babel-preset-es2015-loose": "^6.1.3",
35+
"babel-preset-react": "^6.3.13",
36+
"babel-preset-stage-0": "^6.3.13",
3737
"eslint": "^0.23",
3838
"eslint-config-airbnb": "0.0.6",
39-
"eslint-plugin-react": "^2.3.0",
39+
"eslint-plugin-react": "^3.6.3",
4040
"rimraf": "^2.3.4",
4141
"webpack": "^1.11.0"
4242
},
43+
"peerDependencies": {
44+
"react": "^0.14.3",
45+
"react-dom": "^0.14.3",
46+
"redux-devtools": "^3.0.0"
47+
},
4348
"dependencies": {
4449
"d3-state-visualizer": "^0.5.0",
4550
"deepmerge": "^0.2.10",
4651
"react-pure-render": "^1.0.2",
47-
"redux-devtools": "^3.0.0",
4852
"redux-devtools-themes": "^1.0.0"
4953
}
5054
}

src/Chart.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { PropTypes, Component } from 'react';
2+
import { findDOMNode } from 'react-dom';
23
import visualizer from 'd3-state-visualizer';
34

45
class Chart extends Component {
@@ -34,7 +35,7 @@ class Chart extends Component {
3435
}
3536

3637
componentDidMount() {
37-
this.renderChart = visualizer.charts.tree(React.findDOMNode(this), this.props);
38+
this.renderChart = visualizer.charts.tree(findDOMNode(this), this.props);
3839
this.renderChart();
3940
}
4041

src/ChartMonitor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const styles = {
2020
};
2121

2222
class ChartMonitor extends Component {
23-
static reducer = reducer;
23+
static update = reducer;
2424

2525
static propTypes = {
2626
dispatch: PropTypes.func,
@@ -133,7 +133,7 @@ class ChartMonitor extends Component {
133133
const theme = this.getTheme();
134134

135135
return (
136-
<div style={{...styles.container, backgroundColor: theme.base00}}>
136+
<div style={{...styles.container, backgroundColor: theme.base07}}>
137137
<Chart {...this.getChartOptions()} />
138138
</div>
139139
);

src/reducers.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { SOME_ACTION } from './actions';
22

3-
function someAction(state = 0, action/*, props*/) {
3+
function someAction(props, state = {}, action) {
44
return action.type === SOME_ACTION ?
55
action.data :
66
state;
77
}
88

9-
export default function reducer(state = {}, action, props) {
9+
export default function reducer(props, state = {}, action) {
1010
return {
11-
someState: someAction(state.someAction, action, props)
11+
someState: someAction(props, state.someAction, action)
1212
};
1313
}

0 commit comments

Comments
 (0)