@@ -18,30 +18,43 @@ export default class TestLayout extends React.Component {
1818 return (
1919 < div >
2020 < button onClick = { this . onClick } style = { { 'marginBottom' : '10px' } } > Reset first element's width/height</ button >
21- < Resizable className = "box" height = { this . state . height } width = { this . state . width } onResize = { this . onResize } >
22- < div className = "box" style = { { width : this . state . width + 'px' , height : this . state . height + 'px' } } >
23- < span className = "text" > { "Raw use of <Resizable> element. 200x200, no constraints." } </ span >
24- </ div >
25- </ Resizable >
26- < ResizableBox className = "box" width = { 200 } height = { 200 } >
27- < span className = "text" > { "<ResizableBox>, same as above." } </ span >
28- </ ResizableBox >
29- < ResizableBox className = "box" width = { 200 } height = { 200 } draggableOpts = { { grid : [ 25 , 25 ] } } >
30- < span className = "text" > Resizable box that snaps to even intervals of 25px.</ span >
31- </ ResizableBox >
32- < ResizableBox className = "box" width = { 200 } height = { 200 } minConstraints = { [ 150 , 150 ] } maxConstraints = { [ 500 , 300 ] } >
33- < span className = "text" > Resizable box, starting at 200x200. Min size is 150x150, max is 500x300.</ span >
34- </ ResizableBox >
35- < ResizableBox className = "box box3" width = { 200 } height = { 200 } minConstraints = { [ 150 , 150 ] } maxConstraints = { [ 500 , 300 ] } >
36- < span className = "text" > Resizable box with a handle that only appears on hover.</ span >
37- </ ResizableBox >
38- < ResizableBox className = "box" width = { 200 } height = { 200 } lockAspectRatio = { true } >
39- < span className = "text" > Resizable square with a locked aspect ratio.</ span >
40- </ ResizableBox >
41- < ResizableBox className = "box" width = { 200 } height = { 120 } lockAspectRatio = { true } >
42- < span className = "text" > Resizable rectangle with a locked aspect ratio.</ span >
43- </ ResizableBox >
44-
21+ < div className = "layoutRoot" >
22+ < Resizable className = "box" height = { this . state . height } width = { this . state . width } onResize = { this . onResize } >
23+ < div className = "box" style = { { width : this . state . width + 'px' , height : this . state . height + 'px' } } >
24+ < span className = "text" > { "Raw use of <Resizable> element. 200x200, no constraints." } </ span >
25+ </ div >
26+ </ Resizable >
27+ < ResizableBox className = "box" width = { 200 } height = { 200 } >
28+ < span className = "text" > { "<ResizableBox>, same as above." } </ span >
29+ </ ResizableBox >
30+ < ResizableBox className = "box" width = { 200 } height = { 200 } draggableOpts = { { grid : [ 25 , 25 ] } } >
31+ < span className = "text" > Resizable box that snaps to even intervals of 25px.</ span >
32+ </ ResizableBox >
33+ < ResizableBox className = "box" width = { 200 } height = { 200 } minConstraints = { [ 150 , 150 ] } maxConstraints = { [ 500 , 300 ] } >
34+ < span className = "text" > Resizable box, starting at 200x200. Min size is 150x150, max is 500x300.</ span >
35+ </ ResizableBox >
36+ < ResizableBox className = "box box3" width = { 200 } height = { 200 } minConstraints = { [ 150 , 150 ] } maxConstraints = { [ 500 , 300 ] } >
37+ < span className = "text" > Resizable box with a handle that only appears on hover.</ span >
38+ </ ResizableBox >
39+ < ResizableBox className = "box" width = { 200 } height = { 200 } lockAspectRatio = { true } >
40+ < span className = "text" > Resizable square with a locked aspect ratio.</ span >
41+ </ ResizableBox >
42+ < ResizableBox className = "box" width = { 200 } height = { 120 } lockAspectRatio = { true } >
43+ < span className = "text" > Resizable rectangle with a locked aspect ratio.</ span >
44+ </ ResizableBox >
45+ < ResizableBox className = "box" width = { 200 } height = { 200 } axis = "x" >
46+ < span className = "text" > Only resizable by "x" axis.</ span >
47+ </ ResizableBox >
48+ < ResizableBox className = "box" width = { 200 } height = { 200 } axis = "y" >
49+ < span className = "text" > Only resizable by "y" axis.</ span >
50+ </ ResizableBox >
51+ < ResizableBox className = "box" width = { 200 } height = { 200 } axis = "both" >
52+ < span className = "text" > Resizable ("both" axis).</ span >
53+ </ ResizableBox >
54+ < ResizableBox className = "box" width = { 200 } height = { 200 } axis = "none" >
55+ < span className = "text" > Not resizable ("none" axis).</ span >
56+ </ ResizableBox >
57+ </ div >
4558 </ div >
4659 ) ;
4760 }
0 commit comments