diff --git a/src/JSONArrow.js b/src/JSONArrow.js index 3c5ae83..0325e46 100644 --- a/src/JSONArrow.js +++ b/src/JSONArrow.js @@ -5,7 +5,6 @@ const styles = { display: 'inline-block', marginLeft: 0, marginTop: 8, - marginRight: 5, 'float': 'left', transition: '150ms', WebkitTransition: '150ms', @@ -15,8 +14,13 @@ const styles = { transform: 'rotateZ(-90deg)', position: 'relative' }, - baseDouble: { - marginRight: 10 + container: { + display: 'inline-block', + padding: '2 5', + cursor: 'pointer' + }, + containerDouble: { + padding: '2 10' }, arrow: { borderLeft: '5px solid transparent', @@ -38,6 +42,9 @@ const styles = { export default class JSONArrow extends React.Component { render() { + let containerStyle = { + ...styles.container + }; let style = { ...styles.base, ...styles.arrow @@ -52,9 +59,9 @@ export default class JSONArrow extends React.Component { }; } if (this.props.double) { - style = { - ...style, - ...styles.baseDouble + containerStyle = { + ...containerStyle, + ...styles.containerDouble }; } style = { @@ -62,10 +69,12 @@ export default class JSONArrow extends React.Component { ...this.props.style }; return ( -
- {this.props.double && -
- } +
+
+ {this.props.double && +
+ } +
); } diff --git a/src/JSONNestedNode.js b/src/JSONNestedNode.js index 43c9ce2..2050b8b 100644 --- a/src/JSONNestedNode.js +++ b/src/JSONNestedNode.js @@ -73,7 +73,8 @@ const STYLES = { label: { margin: 0, padding: 0, - display: 'inline-block' + display: 'inline-block', + cursor: 'pointer' }, span: { cursor: 'default'