Skip to content

Commit d9503d5

Browse files
committed
Add lodash dependency :(
1 parent 3abd378 commit d9503d5

File tree

2 files changed

+13
-31
lines changed

2 files changed

+13
-31
lines changed

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
"devDependencies": {
2424
"jsx-loader": "^0.12.2",
2525
"webpack": "^1.7.3"
26+
},
27+
"dependencies": {
28+
"lodash": "^3.5.0"
2629
}
2730
}

src/defaultStyleMixin.js

+10-31
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var update = require('react/addons').addons.update;
1+
var _ = require('lodash');
22

33
module.exports = {
44

@@ -64,60 +64,39 @@ module.exports = {
6464
},
6565

6666
_theatreBodyWrapperStyle: function() {
67-
return update({
67+
return _.assign({
6868
position: 'absolute',
6969
height: 'calc(100% - 8vw)',
7070
width: 'calc(100% - 8vw)',
7171
margin: '4vw',
7272
zIndex: 2,
73-
}, {
74-
$merge: this.displayFlex(),
75-
$merge: this.flexFlow('column'),
76-
});
73+
}, this.displayFlex(), this.flexFlow('column'));
7774
},
7875

7976
_theatreHeaderStyle: function() {
80-
return update({
77+
return _.assign({
8178
marginBottom: '2vh',
82-
}, {
83-
$merge: this.displayFlex(),
84-
});
79+
}, this.displayFlex());
8580
},
8681

8782
_theatreSelectStyle: function() {
88-
return update({
89-
background: 'red',
90-
minHeight: '100px',
91-
}, {
92-
$merge: this.alignItems('center'),
93-
$merge: this.justifyContent('center'),
94-
$merge: this.flex('1 1 auto'),
95-
});
83+
return _.assign({}, this.alignItems('center'), this.justifyContent('center'), this.flex('1 1 auto'));
9684
},
9785

9886
_theatreCloseStyle: function() {
99-
return update({
87+
return _.assign({
10088
color: '#ccc',
10189
cursor: 'pointer',
10290
padding: '1vh 2vw',
10391
fontSize: '2em',
104-
}, {
105-
$merge: this.alignItems('center'),
106-
$merge: this.justifyContent('center'),
107-
$merge: this.flex('0 0 auto'),
108-
});
92+
}, this.alignItems('center'), this.justifyContent('center'), this.flex('0 0 auto'));
10993
},
11094

11195
_theatreContentStyle: function() {
112-
return update({
96+
return _.assign({
11397
height: '100%',
11498
overflowY: 'scroll',
115-
}, {
116-
$merge: this.displayFlex(),
117-
$merge: this.alignItems('center'),
118-
$merge: this.justifyContent('center'),
119-
$merge: this.flexFlow('column'),
120-
});
99+
}, this.displayFlex(), this.justifyContent('center'), this.flexFlow('column'));
121100
},
122101

123102
_progressStyle: function(width) {

0 commit comments

Comments
 (0)