File tree Expand file tree Collapse file tree 1 file changed +32
-7
lines changed
src/examples/basicExample Expand file tree Collapse file tree 1 file changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,23 @@ class App extends Component {
2828 } ,
2929 {
3030 id : 'b12315' ,
31- title : 'Frank' ,
31+ title : (
32+ < div >
33+ < div
34+ style = { {
35+ backgroundColor : 'gray' ,
36+ display : 'inline-block' ,
37+ borderRadius : 10 ,
38+ color : '#FFF' ,
39+ padding : '0 5px' ,
40+ } }
41+ >
42+ Custom
43+ </ div >
44+
45+ Element
46+ </ div >
47+ ) ,
3248 } ,
3349 {
3450 id : 'b12316' ,
@@ -122,14 +138,24 @@ class App extends Component {
122138 updateTreeData = { this . updateTreeData }
123139 maxDepth = { 5 }
124140 generateNodeProps = { ( {
125- node : _node ,
126- path : _path ,
141+ node,
142+ path,
143+ treeIndex,
127144 lowerSiblingCounts : _lowerSiblingCounts ,
128- listIndex : _listIndex ,
129145 } ) => ( {
130146 buttons : [
131- < button > +</ button > ,
132- < button > ℹ</ button > ,
147+ < button
148+ style = { {
149+ verticalAlign : 'middle' ,
150+ } }
151+ onClick = { ( ) => alert ( // eslint-disable-line no-alert
152+ `title: ${ node . title } \n` +
153+ `path: ${ path . join ( ', ' ) } \n` +
154+ `treeIndex: ${ treeIndex } `
155+ ) }
156+ >
157+ ℹ
158+ </ button > ,
133159 ] ,
134160 } ) }
135161 />
@@ -138,7 +164,6 @@ class App extends Component {
138164 < h3 > Features</ h3 >
139165 < ul >
140166 < li > Works right out of the box, but is highly customizable</ li >
141- < li > No external CSS</ li >
142167 </ ul >
143168
144169 < a href = { githubUrl } > Documentation on Github</ a >
You can’t perform that action at this time.
0 commit comments