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

Commit bcdc954

Browse files
author
Jason Axelson
committed
Create a container for JSONArrow for easier clickability
1 parent e5ab132 commit bcdc954

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/JSONArrow.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import React from 'react';
22

3+
const containerStyles = {
4+
display: 'inline-block',
5+
padding: '2 5',
6+
cursor: 'pointer'
7+
};
8+
39
const styles = {
410
base: {
511
display: 'inline-block',
612
marginLeft: 0,
713
marginTop: 8,
8-
marginRight: 5,
914
'float': 'left',
1015
transition: '150ms',
1116
WebkitTransition: '150ms',
@@ -41,6 +46,8 @@ export default class JSONArrow extends React.Component {
4146
...style,
4247
...this.props.style
4348
};
44-
return <div style={style} onClick={this.props.onClick}/>;
49+
return <div className='JSONArrow-container' style={containerStyles} onClick={this.props.onClick}>
50+
<div style={style}/>
51+
</div>;
4552
}
4653
}

src/JSONNestedNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const styles = {
1717
label: {
1818
margin: 0,
1919
padding: 0,
20-
display: 'inline-block'
20+
display: 'inline-block',
21+
cursor: 'pointer'
2122
},
2223
span: {
2324
cursor: 'default'

0 commit comments

Comments
 (0)