mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-10 19:56:54 +03:00
linting
This commit is contained in:
parent
244b897a2e
commit
46e71e7bb3
|
@ -1,7 +1,7 @@
|
|||
import React, { PropTypes, findDOMNode } from 'react';
|
||||
import LogMonitorEntry from './LogMonitorEntry';
|
||||
import LogMonitorButton from './LogMonitorButton';
|
||||
import * as themes from "./themes";
|
||||
import * as themes from './themes';
|
||||
|
||||
const styles = {
|
||||
container: {
|
||||
|
@ -17,7 +17,7 @@ const styles = {
|
|||
buttonBar: {
|
||||
paddingLeft: 2
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default class LogMonitor {
|
||||
constructor() {
|
||||
|
@ -116,10 +116,10 @@ export default class LogMonitor {
|
|||
let theme;
|
||||
if (typeof this.props.theme === 'string') {
|
||||
if (typeof themes[this.props.theme] !== 'undefined') {
|
||||
theme = themes[this.props.theme]
|
||||
theme = themes[this.props.theme];
|
||||
} else {
|
||||
console.warn('DevTools theme ' + this.props.theme + ' not found, defaulting to ocean');
|
||||
theme = themes.ocean
|
||||
theme = themes.ocean;
|
||||
}
|
||||
} else {
|
||||
theme = this.props.theme;
|
||||
|
|
|
@ -8,9 +8,9 @@ const styles = {
|
|||
paddingRight: 6,
|
||||
marginTop: 2,
|
||||
display: 'inline-block',
|
||||
fontSize: "0.8em"
|
||||
}
|
||||
fontSize: '0.8em'
|
||||
}
|
||||
};
|
||||
|
||||
export default class LogMonitorButton extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -18,7 +18,7 @@ export default class LogMonitorButton extends React.Component {
|
|||
this.state = {
|
||||
hovered: false,
|
||||
active: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handleMouseEnter() {
|
||||
|
@ -39,7 +39,7 @@ export default class LogMonitorButton extends React.Component {
|
|||
|
||||
render() {
|
||||
let style = {
|
||||
...styles.base,
|
||||
...styles.base
|
||||
};
|
||||
if (this.state.hovered) {
|
||||
style = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { PropTypes } from 'react';
|
||||
import JSONTree from './JSONTree';
|
||||
import LogMonitorEntryAction from "./LogMonitorEntryAction";
|
||||
import LogMonitorEntryAction from './LogMonitorEntryAction';
|
||||
|
||||
function colorFromString(theme, token) {
|
||||
const splitToken = token.split('');
|
||||
|
@ -32,7 +32,7 @@ export default class LogMonitorEntry {
|
|||
let errorText = error;
|
||||
if (!errorText) {
|
||||
try {
|
||||
return <JSONTree theme={this.props.theme} keyName={'state'} data={this.props.select(state)} />
|
||||
return <JSONTree theme={this.props.theme} keyName={'state'} data={this.props.select(state)} />;
|
||||
} catch (err) {
|
||||
errorText = 'Error selecting state.';
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React from 'react';
|
||||
import JSONTree from './JSONTree';
|
||||
|
||||
const styles = {
|
||||
|
@ -6,7 +6,7 @@ const styles = {
|
|||
borderTopWidth: 1,
|
||||
borderBottomWidth: 1,
|
||||
borderTopStyle: 'solid',
|
||||
borderBottomStyle: 'solid',
|
||||
borderBottomStyle: 'solid'
|
||||
},
|
||||
actionBar: {
|
||||
paddingTop: 4,
|
||||
|
@ -18,15 +18,18 @@ const styles = {
|
|||
backgroundColor: '#252c33',
|
||||
paddingLeft: 15
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default class LogMonitorAction extends React.Component {
|
||||
|
||||
renderPayload(payload) {
|
||||
return (
|
||||
<div style={styles.payload}>
|
||||
{ Object.keys(payload).length > 0 ? <JSONTree theme={this.props.theme} keyName={'payload'} data={payload}/> : "" }
|
||||
{ Object.keys(payload).length > 0 ? <JSONTree theme={this.props.theme} keyName={'payload'} data={payload}/> : '' }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { type, ...payload } = this.props.action;
|
||||
return (
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export { default as ocean } from "./ocean";
|
||||
export { default as monokai } from "./monokai";
|
||||
export { default as ocean } from './ocean';
|
||||
export { default as monokai } from './monokai';
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
export default {
|
||||
scheme: "Monokai",
|
||||
author: "Wimer Hazenberg (http://www.monokai.nl)",
|
||||
base00: "#272822",
|
||||
base01: "#383830",
|
||||
base02: "#49483e",
|
||||
base03: "#75715e",
|
||||
base04: "#a59f85",
|
||||
base05: "#f8f8f2",
|
||||
base06: "#f5f4f1",
|
||||
base07: "#f9f8f5",
|
||||
base08: "#f92672",
|
||||
base09: "#fd971f",
|
||||
base0A: "#f4bf75",
|
||||
base0B: "#a6e22e",
|
||||
base0C: "#a1efe4",
|
||||
base0D: "#66d9ef",
|
||||
base0E: "#ae81ff",
|
||||
base0F: "#cc6633"
|
||||
scheme: 'Monokai',
|
||||
author: 'Wimer Hazenberg (http://www.monokai.nl)',
|
||||
base00: '#272822',
|
||||
base01: '#383830',
|
||||
base02: '#49483e',
|
||||
base03: '#75715e',
|
||||
base04: '#a59f85',
|
||||
base05: '#f8f8f2',
|
||||
base06: '#f5f4f1',
|
||||
base07: '#f9f8f5',
|
||||
base08: '#f92672',
|
||||
base09: '#fd971f',
|
||||
base0A: '#f4bf75',
|
||||
base0B: '#a6e22e',
|
||||
base0C: '#a1efe4',
|
||||
base0D: '#66d9ef',
|
||||
base0E: '#ae81ff',
|
||||
base0F: '#cc6633'
|
||||
};
|
||||
|
|
|
@ -17,4 +17,4 @@ export default {
|
|||
base0D: '#8fa1b3',
|
||||
base0E: '#b48ead',
|
||||
base0F: '#ab7967'
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user