@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.
@@ -5993,7 +5993,8 @@ const Popover$1 = ({
5993
5993
  className,
5994
5994
  content,
5995
5995
  preferredPlacement,
5996
- title
5996
+ title,
5997
+ onClose
5997
5998
  }) => {
5998
5999
  logActionRequired({
5999
6000
  preferredPlacement
@@ -6003,7 +6004,10 @@ const Popover$1 = ({
6003
6004
  const {
6004
6005
  isModern
6005
6006
  } = useTheme();
6006
- const onClose = () => setOpen(false);
6007
+ const handleOnClose = () => {
6008
+ setOpen(false);
6009
+ onClose?.();
6010
+ };
6007
6011
  return /*#__PURE__*/jsxs("span", {
6008
6012
  className: classNames('np-popover', className),
6009
6013
  children: [/*#__PURE__*/jsx("span", {
@@ -6023,7 +6027,7 @@ const Popover$1 = ({
6023
6027
  position: deprecatedPlacements[preferredPlacement] || preferredPlacement,
6024
6028
  arrow: true,
6025
6029
  className: "np-popover__container",
6026
- onClose: onClose,
6030
+ onClose: handleOnClose,
6027
6031
  children: /*#__PURE__*/jsxs("div", {
6028
6032
  className: isModern ? 'np-popover__content np-text-default-body' : 'np-popover__content',
6029
6033
  "aria-hidden": !open,
@@ -6056,6 +6060,7 @@ Popover$1.propTypes = {
6056
6060
  * `'bottom-right'` / `'bottom-left'` are deprecated use `Position.BOTTOM` / `'bottom'` instead
6057
6061
  */
6058
6062
  preferredPlacement: PropTypes.oneOf(['top', 'right', 'bottom', 'left', 'left-top', 'right-top', 'bottom-right', 'bottom-left']),
6063
+ onClose: PropTypes.func,
6059
6064
  title: PropTypes.node
6060
6065
  };
6061
6066
  const deprecatedPlacements = {