File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1010 background : # eee ;
1111 }
1212 .box {
13- position : relative;
1413 background : # ccc ;
1514 border : 1px solid black;
1615 text-align : center;
Original file line number Diff line number Diff line change @@ -91,12 +91,16 @@ export default class Resizable extends React.Component {
9191
9292 render ( ) {
9393 let p = this . props ;
94+ let className = p . className ?
95+ `${ p . className } react-resizable` :
96+ 'react-resizable'
9497
9598 // What we're doing here is getting the child of this element, and cloning it with this element's props.
9699 // We are then defining its children as:
97100 // Its original children (resizable's child's children), and
98101 // A draggable handle.
99102 return cloneElement ( p . children , assign ( { } , p , {
103+ className,
100104 children : [
101105 p . children . props . children ,
102106 < DraggableCore
Original file line number Diff line number Diff line change 88 "test" : " echo \" Error: no test specified\" && exit 1" ,
99 "build" : " bash build.sh" ,
1010 "build-example" : " webpack" ,
11- "dev" : " echo 'Open http://localhost:4002/examples/1.html'; NODE_ENV=test webpack-dev-server --config webpack-dev-server.config.js --hot --progress --colors --port 4002 --content-base ." ,
11+ "dev" : " echo 'Open http://localhost:4002/examples/1.html' && cross-env NODE_ENV=test webpack-dev-server --config webpack-dev-server.config.js --hot --progress --colors --port 4002 --content-base ." ,
1212 "prepublish" : " npm run build" ,
1313 "validate" : " npm ls"
1414 },
3333 "babel-eslint" : " ^4.1.3" ,
3434 "babel-loader" : " ^5.3.2" ,
3535 "babel-plugin-typecheck" : " ^1.3.0" ,
36+ "cross-env" : " ^1.0.7" ,
3637 "css-loader" : " ^0.23.0" ,
3738 "eslint" : " ^1.9.0" ,
3839 "eslint-plugin-react" : " ^3.8.0" ,
You can’t perform that action at this time.
0 commit comments