1
1
'use strict' ;
2
2
3
3
Object . defineProperty ( exports , "__esModule" , {
4
- value : true
4
+ value : true
5
5
} ) ;
6
6
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 ; } ; } ( ) ;
7
+ var _createClass = function ( ) {
8
+ function defineProperties ( target , props ) {
9
+ for ( var i = 0 ; i < props . length ; i ++ ) {
10
+ var descriptor = props [ i ] ;
11
+ descriptor . enumerable = descriptor . enumerable || false ;
12
+ descriptor . configurable = true ;
13
+ if ( "value" in descriptor ) descriptor . writable = true ;
14
+ Object . defineProperty ( target , descriptor . key , descriptor ) ;
15
+ }
16
+ }
17
+ return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ;
18
+ } ( ) ;
8
19
9
20
var _react = require ( 'react' ) ;
10
21
@@ -20,52 +31,59 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
20
31
21
32
function _possibleConstructorReturn ( self , call ) { if ( ! self ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return call && ( typeof call === "object" || typeof call === "function" ) ? call : self ; }
22
33
23
- function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function, not " + typeof superClass ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , enumerable : false , writable : true , configurable : true } } ) ; if ( superClass ) Object . setPrototypeOf ? Object . setPrototypeOf ( subClass , superClass ) : subClass . __proto__ = superClass ; }
24
-
25
- var Google = function ( _React$Component ) {
26
- _inherits ( Google , _React$Component ) ;
34
+ function _inherits ( subClass , superClass ) {
35
+ if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function, not " + typeof superClass ) ; }
36
+ subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , enumerable : false , writable : true , configurable : true } } ) ;
37
+ if ( superClass ) Object . setPrototypeOf ? Object . setPrototypeOf ( subClass , superClass ) : subClass . __proto__ = superClass ;
38
+ }
27
39
28
- function Google ( ) {
29
- _classCallCheck ( this , Google ) ;
40
+ var Google = function ( _React$Component ) {
41
+ _inherits ( Google , _React$Component ) ;
30
42
31
- return _possibleConstructorReturn ( this , ( Google . __proto__ || Object . getPrototypeOf ( Google ) ) . apply ( this , arguments ) ) ;
32
- }
43
+ function Google ( ) {
44
+ _classCallCheck ( this , Google ) ;
33
45
34
- _createClass ( Google , [ {
35
- key : 'componentDidMount' ,
36
- value : function componentDidMount ( ) {
37
- if ( window ) ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
38
- }
39
- } , {
40
- key : 'render' ,
41
- value : function render ( ) {
42
- return _react2 . default . createElement ( 'ins' , { className : this . props . className + ' adsbygoogle' ,
43
- style : this . props . style ,
44
- 'data-ad-client' : this . props . client ,
45
- 'data-ad-slot' : this . props . slot ,
46
- 'data-ad-layout' : this . props . layout ,
47
- 'data-ad-format' : this . props . format } ) ;
46
+ return _possibleConstructorReturn ( this , ( Google . __proto__ || Object . getPrototypeOf ( Google ) ) . apply ( this , arguments ) ) ;
48
47
}
49
- } ] ) ;
50
48
51
- return Google ;
49
+ _createClass ( Google , [ {
50
+ key : 'componentDidMount' ,
51
+ value : function componentDidMount ( ) {
52
+ if ( window ) ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
53
+ }
54
+ } , {
55
+ key : 'render' ,
56
+ value : function render ( ) {
57
+ return _react2 . default . createElement ( 'ins' , {
58
+ className : this . props . className + ' adsbygoogle' ,
59
+ style : this . props . style ,
60
+ 'data-ad-client' : this . props . client ,
61
+ 'data-ad-slot' : this . props . slot ,
62
+ 'data-ad-layout' : this . props . layout ,
63
+ 'data-ad-format' : this . props . format ,
64
+ 'data-full-width-responsive' : this . props . responsive
65
+ } ) ;
66
+ }
67
+ } ] ) ;
68
+
69
+ return Google ;
52
70
} ( _react2 . default . Component ) ;
53
71
54
- exports . default = Google ;
55
- ;
72
+ exports . default = Google ; ;
56
73
57
74
Google . propTypes = {
58
- className : _propTypes2 . default . string ,
59
- style : _propTypes2 . default . object , // eslint-disable-line
60
- client : _propTypes2 . default . string . isRequired ,
61
- slot : _propTypes2 . default . string . isRequired ,
62
- layout : _propTypes2 . default . string ,
63
- format : _propTypes2 . default . string
75
+ className : _propTypes2 . default . string ,
76
+ style : _propTypes2 . default . object , // eslint-disable-line
77
+ client : _propTypes2 . default . string . isRequired ,
78
+ slot : _propTypes2 . default . string . isRequired ,
79
+ layout : _propTypes2 . default . string ,
80
+ format : _propTypes2 . default . string ,
81
+ responsive : _propTypes2 . default . string
64
82
} ;
65
83
66
84
Google . defaultProps = {
67
- className : '' ,
68
- style : { display : 'block' } ,
69
- format : 'auto' ,
70
- layout : ''
85
+ className : '' ,
86
+ style : { display : 'block' } ,
87
+ format : 'auto' ,
88
+ responsive : 'false '
71
89
} ;
0 commit comments