File tree Expand file tree Collapse file tree 3 files changed +19
-17
lines changed Expand file tree Collapse file tree 3 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ export default class Link extends React.PureComponent {
66
66
}
67
67
}
68
68
69
+ Link . defaultProps = {
70
+ styles : { } ,
71
+ } ;
72
+
69
73
Link . propTypes = {
70
74
linkData : PropTypes . object . isRequired ,
71
75
orientation : PropTypes . oneOf ( [
@@ -77,5 +81,5 @@ Link.propTypes = {
77
81
'elbow' ,
78
82
] ) . isRequired ,
79
83
transitionDuration : PropTypes . number . isRequired ,
80
- styles : PropTypes . object . isRequired ,
84
+ styles : PropTypes . object ,
81
85
} ;
Original file line number Diff line number Diff line change @@ -116,6 +116,18 @@ export default class Node extends React.Component {
116
116
Node . defaultProps = {
117
117
textAnchor : 'start' ,
118
118
attributes : undefined ,
119
+ styles : {
120
+ node : {
121
+ circle : { } ,
122
+ name : { } ,
123
+ attributes : { } ,
124
+ } ,
125
+ leafNode : {
126
+ circle : { } ,
127
+ name : { } ,
128
+ attributes : { } ,
129
+ } ,
130
+ } ,
119
131
} ;
120
132
121
133
Node . propTypes = {
@@ -130,5 +142,5 @@ Node.propTypes = {
130
142
attributes : PropTypes . object ,
131
143
textAnchor : PropTypes . string ,
132
144
circleRadius : PropTypes . number . isRequired ,
133
- styles : PropTypes . object . isRequired ,
145
+ styles : PropTypes . object ,
134
146
} ;
Original file line number Diff line number Diff line change @@ -325,21 +325,7 @@ Tree.defaultProps = {
325
325
nodeSize : { x : 140 , y : 140 } ,
326
326
separation : { siblings : 1 , nonSiblings : 2 } ,
327
327
circleRadius : 10 ,
328
- styles : {
329
- nodes : {
330
- node : {
331
- circle : { } ,
332
- name : { } ,
333
- attributes : { } ,
334
- } ,
335
- leafNode : {
336
- circle : { } ,
337
- name : { } ,
338
- attributes : { } ,
339
- } ,
340
- } ,
341
- links : { } ,
342
- } ,
328
+ styles : { } ,
343
329
} ;
344
330
345
331
Tree . propTypes = {
You can’t perform that action at this time.
0 commit comments