@transferwise/components 0.0.0-experimental-e2c4313 → 0.0.0-experimental-cbb427b

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/build/index.js CHANGED
@@ -6027,7 +6027,8 @@ const Popover$1 = ({
6027
6027
  className,
6028
6028
  content,
6029
6029
  preferredPlacement,
6030
- title
6030
+ title,
6031
+ onClose
6031
6032
  }) => {
6032
6033
  logActionRequired({
6033
6034
  preferredPlacement
@@ -6037,7 +6038,10 @@ const Popover$1 = ({
6037
6038
  const {
6038
6039
  isModern
6039
6040
  } = componentsTheming.useTheme();
6040
- const onClose = () => setOpen(false);
6041
+ const handleOnClose = () => {
6042
+ setOpen(false);
6043
+ onClose?.();
6044
+ };
6041
6045
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
6042
6046
  className: classNames__default.default('np-popover', className),
6043
6047
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
@@ -6057,7 +6061,7 @@ const Popover$1 = ({
6057
6061
  position: deprecatedPlacements[preferredPlacement] || preferredPlacement,
6058
6062
  arrow: true,
6059
6063
  className: "np-popover__container",
6060
- onClose: onClose,
6064
+ onClose: handleOnClose,
6061
6065
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6062
6066
  className: isModern ? 'np-popover__content np-text-default-body' : 'np-popover__content',
6063
6067
  "aria-hidden": !open,
@@ -6090,6 +6094,7 @@ Popover$1.propTypes = {
6090
6094
  * `'bottom-right'` / `'bottom-left'` are deprecated use `Position.BOTTOM` / `'bottom'` instead
6091
6095
  */
6092
6096
  preferredPlacement: PropTypes__default.default.oneOf(['top', 'right', 'bottom', 'left', 'left-top', 'right-top', 'bottom-right', 'bottom-left']),
6097
+ onClose: PropTypes__default.default.func,
6093
6098
  title: PropTypes__default.default.node
6094
6099
  };
6095
6100
  const deprecatedPlacements = {