tg-core-components 6.3.8-1 → 6.3.8-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,11 +13,13 @@ export var LOADING = {
|
|
|
13
13
|
|
|
14
14
|
var Picture = function Picture(_ref) {
|
|
15
15
|
var src = _ref.src,
|
|
16
|
+
load = _ref.load,
|
|
17
|
+
opacity = _ref.opacity,
|
|
16
18
|
width = _ref.width,
|
|
17
19
|
height = _ref.height,
|
|
18
20
|
loading = _ref.loading,
|
|
19
21
|
className = _ref.className,
|
|
20
|
-
rest = _objectWithoutProperties(_ref, ['src', 'width', 'height', 'loading', 'className']);
|
|
22
|
+
rest = _objectWithoutProperties(_ref, ['src', 'load', 'opacity', 'width', 'height', 'loading', 'className']);
|
|
21
23
|
|
|
22
24
|
if (!src) {
|
|
23
25
|
return React.createElement('img', null);
|
|
@@ -25,7 +27,7 @@ var Picture = function Picture(_ref) {
|
|
|
25
27
|
|
|
26
28
|
return React.createElement(
|
|
27
29
|
'picture',
|
|
28
|
-
{ className: cn('Picture', className) },
|
|
30
|
+
{ className: cn('Picture', className), style: { opacity: opacity } },
|
|
29
31
|
Array.isArray(src) && src.map(function (image, i) {
|
|
30
32
|
return React.createElement('source', {
|
|
31
33
|
key: i,
|
|
@@ -38,6 +40,11 @@ var Picture = function Picture(_ref) {
|
|
|
38
40
|
src: typeof src === 'string' ? src : undefined,
|
|
39
41
|
width: width,
|
|
40
42
|
height: height,
|
|
43
|
+
onLoad: function onLoad() {
|
|
44
|
+
if (typeof load === 'function') {
|
|
45
|
+
load();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
41
48
|
loading: loading
|
|
42
49
|
}, rest))
|
|
43
50
|
);
|
|
@@ -52,6 +59,8 @@ Picture.propTypes = {
|
|
|
52
59
|
width: PropTypes.number,
|
|
53
60
|
height: PropTypes.number,
|
|
54
61
|
lazy: PropTypes.bool,
|
|
62
|
+
load: PropTypes.func,
|
|
63
|
+
opacity: PropTypes.number,
|
|
55
64
|
className: PropTypes.string
|
|
56
65
|
};
|
|
57
66
|
|
|
@@ -161,7 +161,7 @@ var LimitHeader = function LimitHeader(_ref2) {
|
|
|
161
161
|
'div',
|
|
162
162
|
{ className: 'ResponsibleGamingWidget__limit-header' },
|
|
163
163
|
title && React.createElement(
|
|
164
|
-
'
|
|
164
|
+
'div',
|
|
165
165
|
{ className: 'ResponsibleGamingWidget__limit-header-title' },
|
|
166
166
|
title
|
|
167
167
|
)
|
|
@@ -30,11 +30,13 @@ var LOADING = exports.LOADING = {
|
|
|
30
30
|
|
|
31
31
|
var Picture = function Picture(_ref) {
|
|
32
32
|
var src = _ref.src,
|
|
33
|
+
load = _ref.load,
|
|
34
|
+
opacity = _ref.opacity,
|
|
33
35
|
width = _ref.width,
|
|
34
36
|
height = _ref.height,
|
|
35
37
|
loading = _ref.loading,
|
|
36
38
|
className = _ref.className,
|
|
37
|
-
rest = _objectWithoutProperties(_ref, ['src', 'width', 'height', 'loading', 'className']);
|
|
39
|
+
rest = _objectWithoutProperties(_ref, ['src', 'load', 'opacity', 'width', 'height', 'loading', 'className']);
|
|
38
40
|
|
|
39
41
|
if (!src) {
|
|
40
42
|
return _react2.default.createElement('img', null);
|
|
@@ -42,7 +44,7 @@ var Picture = function Picture(_ref) {
|
|
|
42
44
|
|
|
43
45
|
return _react2.default.createElement(
|
|
44
46
|
'picture',
|
|
45
|
-
{ className: (0, _classnames2.default)('Picture', className) },
|
|
47
|
+
{ className: (0, _classnames2.default)('Picture', className), style: { opacity: opacity } },
|
|
46
48
|
Array.isArray(src) && src.map(function (image, i) {
|
|
47
49
|
return _react2.default.createElement('source', {
|
|
48
50
|
key: i,
|
|
@@ -55,6 +57,11 @@ var Picture = function Picture(_ref) {
|
|
|
55
57
|
src: typeof src === 'string' ? src : undefined,
|
|
56
58
|
width: width,
|
|
57
59
|
height: height,
|
|
60
|
+
onLoad: function onLoad() {
|
|
61
|
+
if (typeof load === 'function') {
|
|
62
|
+
load();
|
|
63
|
+
}
|
|
64
|
+
},
|
|
58
65
|
loading: loading
|
|
59
66
|
}, rest))
|
|
60
67
|
);
|
|
@@ -69,6 +76,8 @@ Picture.propTypes = {
|
|
|
69
76
|
width: _propTypes2.default.number,
|
|
70
77
|
height: _propTypes2.default.number,
|
|
71
78
|
lazy: _propTypes2.default.bool,
|
|
79
|
+
load: _propTypes2.default.func,
|
|
80
|
+
opacity: _propTypes2.default.number,
|
|
72
81
|
className: _propTypes2.default.string
|
|
73
82
|
};
|
|
74
83
|
|
|
@@ -203,7 +203,7 @@ var LimitHeader = function LimitHeader(_ref2) {
|
|
|
203
203
|
'div',
|
|
204
204
|
{ className: 'ResponsibleGamingWidget__limit-header' },
|
|
205
205
|
title && _react2.default.createElement(
|
|
206
|
-
'
|
|
206
|
+
'div',
|
|
207
207
|
{ className: 'ResponsibleGamingWidget__limit-header-title' },
|
|
208
208
|
title
|
|
209
209
|
)
|