File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
/** @jsx React.DOM */
4
- var React = require ( 'react/addons ' ) ;
4
+ var React = require ( 'react' ) ;
5
5
var emptyFunction = require ( 'react/lib/emptyFunction' ) ;
6
6
var CX = React . addons . classSet ;
7
7
@@ -446,11 +446,12 @@ module.exports = React.createClass({
446
446
if ( this . state . dragging && ! isNaN ( this . props . zIndex ) ) {
447
447
style . zIndex = this . props . zIndex ;
448
448
}
449
-
450
- var className = CX ( {
451
- 'react-draggable' : true ,
452
- 'react-draggable-dragging' : this . state . dragging
453
- } ) ;
449
+
450
+ var className = 'react-draggable' ;
451
+ if ( this . state . dragging ) {
452
+ className += ' react-draggable-dragging' ;
453
+ }
454
+
454
455
// Reuse the child provided
455
456
// This makes it flexible to use whatever element is wanted (div, ul, etc)
456
457
return React . addons . cloneWithProps ( React . Children . only ( this . props . children ) , {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
libraryTarget : 'umd'
8
8
} ,
9
9
externals : {
10
- 'react/addons ' : 'React'
10
+ 'react' : 'React'
11
11
} ,
12
12
module : {
13
13
loaders : [
You can’t perform that action at this time.
0 commit comments