@micromag/element-scroll 0.3.667 → 0.3.671

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.
Files changed (2) hide show
  1. package/es/index.js +8 -2
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -14,6 +14,8 @@ var propTypes = {
14
14
  disabled: PropTypes.bool,
15
15
  verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom']),
16
16
  className: PropTypes.string,
17
+ scrollableClassName: PropTypes.string,
18
+ scrolleeClassName: PropTypes.string,
17
19
  children: PropTypes.node,
18
20
  scrollPosition: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
19
21
  onScrolledBottom: PropTypes.func,
@@ -30,6 +32,8 @@ var defaultProps = {
30
32
  disabled: false,
31
33
  verticalAlign: null,
32
34
  className: null,
35
+ scrollableClassName: null,
36
+ scrolleeClassName: null,
33
37
  children: null,
34
38
  scrollPosition: null,
35
39
  onScrolledBottom: null,
@@ -45,6 +49,8 @@ function Scroll(_ref) {
45
49
  disabled = _ref.disabled,
46
50
  verticalAlign = _ref.verticalAlign,
47
51
  className = _ref.className,
52
+ scrollableClassName = _ref.scrollableClassName,
53
+ scrolleeClassName = _ref.scrolleeClassName,
48
54
  children = _ref.children,
49
55
  scrollPosition = _ref.scrollPosition,
50
56
  onScrolledBottom = _ref.onScrolledBottom,
@@ -146,10 +152,10 @@ function Scroll(_ref) {
146
152
  className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.withScroll, !disabled), className, className !== null), styles[verticalAlign], verticalAlign !== null && scrolleeHeight < scrollableHeight), styles.withArrow, showArrow && withArrow), styles.withShadow, withShadow)]),
147
153
  style: finalStyle
148
154
  }, /*#__PURE__*/React.createElement("div", Object.assign({
149
- className: styles.scrollable,
155
+ className: classNames([styles.scrollable, _defineProperty({}, scrollableClassName, scrollableClassName !== null)]),
150
156
  ref: scrollableRef
151
157
  }, bind()), /*#__PURE__*/React.createElement("div", {
152
- className: styles.scrollee,
158
+ className: classNames([styles.scrollee, _defineProperty({}, scrolleeClassName, scrolleeClassName !== null)]),
153
159
  ref: scrolleeRef
154
160
  }, children)), !disabled && showArrow ? /*#__PURE__*/React.createElement("div", {
155
161
  className: styles.arrowContainer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-scroll",
3
- "version": "0.3.667",
3
+ "version": "0.3.671",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.667",
62
+ "@micromag/core": "^0.3.668",
63
63
  "@use-gesture/react": "^10.3.0",
64
64
  "classnames": "^2.2.6",
65
65
  "lodash": "^4.17.21",
@@ -71,5 +71,5 @@
71
71
  "access": "public",
72
72
  "registry": "https://registry.npmjs.org/"
73
73
  },
74
- "gitHead": "8974de0b7dbe3ab5d632d0449b7a25ee20336a1c"
74
+ "gitHead": "4fdb72a0528d5faeaa9d04ea18d91263af9736e6"
75
75
  }