@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', {
6
6
7
7
var _createClass = ( function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( 'value' in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ) ( ) ;
8
8
9
- var _get = function get ( _x , _x2 , _x3 ) { var _again = true ; _function: while ( _again ) { var object = _x , property = _x2 , receiver = _x3 ; desc = parent = getter = undefined ; _again = false ; if ( object === null ) object = Function . prototype ; var desc = Object . getOwnPropertyDescriptor ( object , property ) ; if ( desc === undefined ) { var parent = Object . getPrototypeOf ( object ) ; if ( parent === null ) { return undefined ; } else { _x = parent ; _x2 = property ; _x3 = receiver ; _again = true ; continue _function; } } else if ( 'value' in desc ) { return desc . value ; } else { var getter = desc . get ; if ( getter === undefined ) { return undefined ; } return getter . call ( receiver ) ; } } } ;
9
+ var _get = function get ( _x2 , _x3 , _x4 ) { var _again = true ; _function: while ( _again ) { var object = _x2 , property = _x3 , receiver = _x4 ; desc = parent = getter = undefined ; _again = false ; if ( object === null ) object = Function . prototype ; var desc = Object . getOwnPropertyDescriptor ( object , property ) ; if ( desc === undefined ) { var parent = Object . getPrototypeOf ( object ) ; if ( parent === null ) { return undefined ; } else { _x2 = parent ; _x3 = property ; _x4 = receiver ; _again = true ; continue _function; } } else if ( 'value' in desc ) { return desc . value ; } else { var getter = desc . get ; if ( getter === undefined ) { return undefined ; } return getter . call ( receiver ) ; } } } ;
10
10
11
11
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
12
12
@@ -19,14 +19,17 @@ var _linkClass = require('./linkClass');
19
19
var _linkClass2 = _interopRequireDefault ( _linkClass ) ;
20
20
21
21
/**
22
- * @param {ReactClass } Target
23
- * @param {Object } styles {localClassName: 'generatedClassName'}
22
+ * @param {ReactClass } Component
23
+ * @param {Object } styles CSS modules class map.
24
+ * @param {Object } options {@link https://github.com/gajus/react-css-modules#options }
24
25
* @return {ReactClass }
25
26
*/
26
27
27
- exports [ 'default' ] = function ( Target , styles ) {
28
- return ( function ( _Target ) {
29
- _inherits ( _class , _Target ) ;
28
+ exports [ 'default' ] = function ( Component , styles ) {
29
+ var options = arguments . length <= 2 || arguments [ 2 ] === undefined ? { } : arguments [ 2 ] ;
30
+
31
+ return ( function ( _Component ) {
32
+ _inherits ( _class , _Component ) ;
30
33
31
34
function _class ( ) {
32
35
_classCallCheck ( this , _class ) ;
@@ -37,12 +40,20 @@ exports['default'] = function (Target, styles) {
37
40
_createClass ( _class , [ {
38
41
key : 'render' ,
39
42
value : function render ( ) {
40
- return ( 0 , _linkClass2 [ 'default' ] ) ( _get ( Object . getPrototypeOf ( _class . prototype ) , 'render' , this ) . call ( this ) , styles ) ;
43
+ if ( options . allowMultiple !== false ) {
44
+ options . allowMultiple = true ;
45
+ }
46
+
47
+ if ( options . includeOriginal !== false ) {
48
+ options . includeOriginal = true ;
49
+ }
50
+
51
+ return ( 0 , _linkClass2 [ 'default' ] ) ( _get ( Object . getPrototypeOf ( _class . prototype ) , 'render' , this ) . call ( this ) , styles , options ) ;
41
52
}
42
53
} ] ) ;
43
54
44
55
return _class ;
45
- } ) ( Target ) ;
56
+ } ) ( Component ) ;
46
57
} ;
47
58
48
59
module . exports = exports [ 'default' ] ;
0 commit comments