dzannotti 2015-08-10 22:39:57 +01:00
parent 021e95071f
commit b7468c33eb
4 changed files with 15 additions and 4 deletions

View File

@ -9,7 +9,7 @@ const styles = {
paddingTop: 2,
paddingBottom: 2,
paddingRight: 4,
marginLeft: 10
marginLeft: 3
},
label: {
margin: 0,

View File

@ -9,7 +9,7 @@ const styles = {
paddingTop: 2,
paddingBottom: 2,
paddingRight: 4,
marginLeft: 10
marginLeft: 3
},
label: {
margin: 0,

View File

@ -43,7 +43,10 @@ export default class JSONTree extends React.Component {
rootNode = <JSONArrayNode theme={this.props.theme} data={this.props.data} previousData={this.props.previousData} initialExpanded={true} keyName={keyName} />;
}
return (
<ul style={styles.tree}>
<ul style={{
...styles.tree,
...this.props.style
}}>
{rootNode}
</ul>
);

View File

@ -14,6 +14,9 @@ const styles = {
entry: {
display: 'block',
WebkitUserSelect: 'none'
},
tree: {
paddingLeft: 5
}
};
@ -32,7 +35,12 @@ export default class LogMonitorEntry {
let errorText = error;
if (!errorText) {
try {
return <JSONTree theme={this.props.theme} keyName={'state'} data={this.props.select(state)} previousData={this.props.select(this.props.previousState)}/>;
return <JSONTree
theme={this.props.theme}
keyName={'state'}
data={this.props.select(state)}
previousData={this.props.select(this.props.previousState)}
style={styles.tree}/>;
} catch (err) {
errorText = 'Error selecting state.';
}