@moda/om 17.1.0 → 17.2.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [17.2.0](https://github.com/ModaOperandi/om/compare/v17.1.0...v17.2.0) (2022-08-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * **colorswatch:** add title to the callbacks ([a259d7a](https://github.com/ModaOperandi/om/commit/a259d7a76785dccc30fb6489702e3ab1d5ee0055))
12
+
6
13
  # [17.1.0](https://github.com/ModaOperandi/om/compare/v17.0.0...v17.1.0) (2022-08-17)
7
14
 
8
15
 
package/dist/index.cjs.js CHANGED
@@ -5991,7 +5991,7 @@ var SKU_COLORS = {
5991
5991
  yellow: '#ffca44'
5992
5992
  };
5993
5993
 
5994
- var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
5994
+ var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled", "title"];
5995
5995
  var ColorSwatch = function ColorSwatch(_ref) {
5996
5996
  var className = _ref.className,
5997
5997
  size = _ref.size,
@@ -6005,14 +6005,15 @@ var ColorSwatch = function ColorSwatch(_ref) {
6005
6005
  onClick = _ref.onClick,
6006
6006
  onMouseEnter = _ref.onMouseEnter,
6007
6007
  disabled = _ref.disabled,
6008
+ title = _ref.title,
6008
6009
  rest = _objectWithoutProperties(_ref, _excluded$s);
6009
6010
 
6010
6011
  var handleClick = React.useCallback(function (_event) {
6011
- onClick && onClick(color);
6012
- }, [color, onClick]);
6012
+ onClick && onClick(color, title);
6013
+ }, [color, title, onClick]);
6013
6014
  var handleMouseEnter = React.useCallback(function (_event) {
6014
- onMouseEnter && onMouseEnter(color);
6015
- }, [color, onMouseEnter]);
6015
+ onMouseEnter && onMouseEnter(color, title);
6016
+ }, [color, title, onMouseEnter]);
6016
6017
  var backgroundColor = SKU_COLORS[color];
6017
6018
 
6018
6019
  var styles = _objectSpread2({
@@ -6034,7 +6035,8 @@ var ColorSwatch = function ColorSwatch(_ref) {
6034
6035
  }, className),
6035
6036
  onClick: handleClick,
6036
6037
  onMouseEnter: handleMouseEnter,
6037
- disabled: disabled
6038
+ disabled: disabled,
6039
+ title: title
6038
6040
  }, rest), /*#__PURE__*/React__default["default"].createElement("div", {
6039
6041
  className: "ColorSwatch__chip",
6040
6042
  style: styles