File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 20
20
"predist" : " rm -rf ./build" ,
21
21
"dist" : " NODE_ENV=production webpack-cli --config ./webpack/dist.config.js && NODE_ENV=production webpack-cli --config ./webpack/min.config.js" ,
22
22
"preghPages" : " yarn pub" ,
23
- "ghPages" : " gh-pages --dist ./pub --repo git@github.com:nkbt/react-collapse.git --user nik@butenko.me --branch gh-pages --message 'Publish examples' " ,
23
+ "ghPages" : " gh-pages --dist ./pub --repo git@github.com:nkbt/react-collapse.git --user nik@butenko.me --branch gh-pages --message 'Publish examples'" ,
24
24
"prelib" : " rm -rf ./lib" ,
25
25
"lib" : " NODE_ENV=production babel src --out-dir lib" ,
26
26
"lint" : " eslint ." ,
Original file line number Diff line number Diff line change @@ -153,16 +153,21 @@ export class Collapse extends React.Component {
153
153
} ;
154
154
155
155
156
+ onRefContainer = container => {
157
+ this . container = container ;
158
+ } ;
159
+
160
+
161
+ onRefContent = content => {
162
+ this . content = content ;
163
+ } ;
164
+
165
+
156
166
render ( ) {
157
167
const { theme, children} = this . props ;
158
168
return (
159
- < div
160
- ref = { container => Object . assign ( this , { container} ) }
161
- className = { theme . collapse }
162
- style = { this . initialStyle } >
163
- < div
164
- ref = { content => Object . assign ( this , { content} ) }
165
- className = { theme . content } >
169
+ < div ref = { this . onRefContainer } className = { theme . collapse } style = { this . initialStyle } >
170
+ < div ref = { this . onRefContent } className = { theme . content } >
166
171
{ children }
167
172
</ div >
168
173
</ div >
Original file line number Diff line number Diff line change @@ -2,5 +2,10 @@ const {Collapse} = require('./Collapse');
2
2
const { UnmountClosed} = require ( './UnmountClosed' ) ;
3
3
4
4
5
- Object . assign ( UnmountClosed , { Collapse , UnmountClosed } ) ;
5
+ // Default export
6
6
module . exports = UnmountClosed ;
7
+
8
+
9
+ // Extra "named exports"
10
+ UnmountClosed . Collapse = Collapse ;
11
+ UnmountClosed . UnmountClosed = UnmountClosed ;
You can’t perform that action at this time.
0 commit comments