removed diff from object and arrays

This commit is contained in:
dzannotti 2015-08-07 23:54:38 +01:00
parent fb83a18614
commit deb9fa6225
2 changed files with 2 additions and 14 deletions

View File

@ -89,20 +89,14 @@ export default class JSONArrayNode extends React.Component {
listStyle: 'none',
display: (this.state.expanded) ? 'block' : 'none'
};
let backgroundColor = 'transparent';
let containerStyle;
let spanStyle = {
...styles.span,
color: this.props.theme.base0E
};
if (typeof this.props.previousData !== 'undefined' && this.props.previousData === this.data) {
const bgColor = hexToRgb(this.props.theme.base08);
backgroundColor = `rgba(${bgColor.r}, ${bgColor.g}, ${bgColor.b}, 0.04)`;
}
containerStyle = {
...styles.base,
...styles.parentNode,
backgroundColor
...styles.parentNode
}
if (this.state.expanded) {

View File

@ -92,20 +92,14 @@ export default class JSONObjectNode extends React.Component {
listStyle: 'none',
display: (this.state.expanded) ? 'block' : 'none'
};
let backgroundColor = 'transparent';
let containerStyle;
let spanStyle = {
...styles.span,
color: this.props.theme.base0B
};
if (typeof this.props.previousData !== 'undefined' && !shallowEqual(this.props.data, this.props.previousData || {})) {
const bgColor = hexToRgb(this.props.theme.base08);
backgroundColor = `rgba(${bgColor.r}, ${bgColor.g}, ${bgColor.b}, 0.04)`;
}
containerStyle = {
...styles.base,
...styles.parentNode,
backgroundColor
...styles.parentNode
};
if (this.state.expanded) {
spanStyle = {