@micromag/element-scroll 0.3.126 → 0.3.128
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.
- package/es/index.js +7 -5
- package/lib/index.js +7 -5
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var propTypes = {
|
|
|
16
16
|
disabled: PropTypes.bool,
|
|
17
17
|
verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom']),
|
|
18
18
|
className: PropTypes.string,
|
|
19
|
+
scrolleeClassName: PropTypes.string,
|
|
19
20
|
children: PropTypes.node,
|
|
20
21
|
onScrolledBottom: PropTypes.func,
|
|
21
22
|
onScrolledNotBottom: PropTypes.func,
|
|
@@ -29,6 +30,7 @@ var defaultProps = {
|
|
|
29
30
|
disabled: false,
|
|
30
31
|
verticalAlign: null,
|
|
31
32
|
className: null,
|
|
33
|
+
scrolleeClassName: null,
|
|
32
34
|
children: null,
|
|
33
35
|
onScrolledBottom: null,
|
|
34
36
|
onScrolledNotBottom: null,
|
|
@@ -44,6 +46,7 @@ function Scroll(_ref) {
|
|
|
44
46
|
disabled = _ref.disabled,
|
|
45
47
|
verticalAlign = _ref.verticalAlign,
|
|
46
48
|
className = _ref.className,
|
|
49
|
+
scrolleeClassName = _ref.scrolleeClassName,
|
|
47
50
|
children = _ref.children,
|
|
48
51
|
onScrolledBottom = _ref.onScrolledBottom,
|
|
49
52
|
onScrolledNotBottom = _ref.onScrolledNotBottom,
|
|
@@ -70,9 +73,9 @@ function Scroll(_ref) {
|
|
|
70
73
|
scrollContainerRef.current = scrollableRef.current; // eslint-disable-line
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
var _useResizeObserver2 = useResizeObserver()
|
|
74
|
-
|
|
75
|
-
scrolleeRect = _useResizeObserver2.entry.contentRect;
|
|
76
|
+
var _useResizeObserver2 = useResizeObserver();
|
|
77
|
+
_useResizeObserver2.ref;
|
|
78
|
+
var scrolleeRect = _useResizeObserver2.entry.contentRect;
|
|
76
79
|
|
|
77
80
|
var _ref3 = scrolleeRect || {},
|
|
78
81
|
scrolleeHeight = _ref3.height;
|
|
@@ -143,8 +146,7 @@ function Scroll(_ref) {
|
|
|
143
146
|
className: styles.scrollable,
|
|
144
147
|
ref: scrollableRef
|
|
145
148
|
}, bind()), /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: styles.scrollee,
|
|
147
|
-
ref: scrolleeRef
|
|
149
|
+
className: classNames([styles.scrollee, _defineProperty({}, scrolleeClassName, scrolleeClassName !== null)])
|
|
148
150
|
}, children)), !disabled ? /*#__PURE__*/React.createElement("div", {
|
|
149
151
|
className: styles.arrowContainer
|
|
150
152
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
package/lib/index.js
CHANGED
|
@@ -26,6 +26,7 @@ var propTypes = {
|
|
|
26
26
|
disabled: PropTypes__default["default"].bool,
|
|
27
27
|
verticalAlign: PropTypes__default["default"].oneOf(['top', 'middle', 'bottom']),
|
|
28
28
|
className: PropTypes__default["default"].string,
|
|
29
|
+
scrolleeClassName: PropTypes__default["default"].string,
|
|
29
30
|
children: PropTypes__default["default"].node,
|
|
30
31
|
onScrolledBottom: PropTypes__default["default"].func,
|
|
31
32
|
onScrolledNotBottom: PropTypes__default["default"].func,
|
|
@@ -39,6 +40,7 @@ var defaultProps = {
|
|
|
39
40
|
disabled: false,
|
|
40
41
|
verticalAlign: null,
|
|
41
42
|
className: null,
|
|
43
|
+
scrolleeClassName: null,
|
|
42
44
|
children: null,
|
|
43
45
|
onScrolledBottom: null,
|
|
44
46
|
onScrolledNotBottom: null,
|
|
@@ -54,6 +56,7 @@ function Scroll(_ref) {
|
|
|
54
56
|
disabled = _ref.disabled,
|
|
55
57
|
verticalAlign = _ref.verticalAlign,
|
|
56
58
|
className = _ref.className,
|
|
59
|
+
scrolleeClassName = _ref.scrolleeClassName,
|
|
57
60
|
children = _ref.children,
|
|
58
61
|
onScrolledBottom = _ref.onScrolledBottom,
|
|
59
62
|
onScrolledNotBottom = _ref.onScrolledNotBottom,
|
|
@@ -80,9 +83,9 @@ function Scroll(_ref) {
|
|
|
80
83
|
scrollContainerRef.current = scrollableRef.current; // eslint-disable-line
|
|
81
84
|
}
|
|
82
85
|
|
|
83
|
-
var _useResizeObserver2 = hooks.useResizeObserver()
|
|
84
|
-
|
|
85
|
-
scrolleeRect = _useResizeObserver2.entry.contentRect;
|
|
86
|
+
var _useResizeObserver2 = hooks.useResizeObserver();
|
|
87
|
+
_useResizeObserver2.ref;
|
|
88
|
+
var scrolleeRect = _useResizeObserver2.entry.contentRect;
|
|
86
89
|
|
|
87
90
|
var _ref3 = scrolleeRect || {},
|
|
88
91
|
scrolleeHeight = _ref3.height;
|
|
@@ -153,8 +156,7 @@ function Scroll(_ref) {
|
|
|
153
156
|
className: styles.scrollable,
|
|
154
157
|
ref: scrollableRef
|
|
155
158
|
}, bind()), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
156
|
-
className: styles.scrollee,
|
|
157
|
-
ref: scrolleeRef
|
|
159
|
+
className: classNames__default["default"]([styles.scrollee, _defineProperty__default["default"]({}, scrolleeClassName, scrolleeClassName !== null)])
|
|
158
160
|
}, children)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
159
161
|
className: styles.arrowContainer
|
|
160
162
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-scroll",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.128",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c968790aaa40811a33fd151892abc083bc596d4b"
|
|
67
67
|
}
|