@transferwise/components 45.22.0 → 45.24.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.
@@ -5851,6 +5851,18 @@ const Header = ({
5851
5851
  title,
5852
5852
  className
5853
5853
  }) => {
5854
+ if (!action) {
5855
+ return /*#__PURE__*/jsx(Title, {
5856
+ as: as,
5857
+ type: Typography.TITLE_GROUP,
5858
+ className: classNames('np-header', 'np-header__title', className),
5859
+ children: title
5860
+ });
5861
+ }
5862
+ if (as === 'legend') {
5863
+ // eslint-disable-next-line no-console
5864
+ console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
5865
+ }
5854
5866
  return /*#__PURE__*/jsxs("div", {
5855
5867
  className: classNames('np-header', className),
5856
5868
  children: [/*#__PURE__*/jsx(Title, {
@@ -5858,7 +5870,7 @@ const Header = ({
5858
5870
  type: Typography.TITLE_GROUP,
5859
5871
  className: "np-header__title",
5860
5872
  children: title
5861
- }), action && /*#__PURE__*/jsx(HeaderAction, {
5873
+ }), /*#__PURE__*/jsx(HeaderAction, {
5862
5874
  action: action
5863
5875
  })]
5864
5876
  });
@@ -8731,9 +8743,6 @@ const Nudge = ({
8731
8743
  id,
8732
8744
  className
8733
8745
  }) => {
8734
- const {
8735
- isModern
8736
- } = useTheme();
8737
8746
  const [isDismissed, setIsDismissed] = useState(false);
8738
8747
  const [isMounted, setIsMounted] = useState(false);
8739
8748
  const handleOnDismiss = () => {
@@ -8770,7 +8779,7 @@ const Nudge = ({
8770
8779
  return /*#__PURE__*/jsxs("div", {
8771
8780
  className: classNames('wds-nudge', className),
8772
8781
  id: id,
8773
- children: [isModern ? !!mediaName && /*#__PURE__*/jsx("div", {
8782
+ children: [!!mediaName && /*#__PURE__*/jsx("div", {
8774
8783
  className: "wds-nudge-media",
8775
8784
  children: /*#__PURE__*/jsx(Illustration, {
8776
8785
  name: mediaName,
@@ -8779,20 +8788,14 @@ const Nudge = ({
8779
8788
  disablePadding: true,
8780
8789
  alt: ""
8781
8790
  })
8782
- }) : /*#__PURE__*/jsx("div", {
8783
- className: "wds-nudge-media",
8784
- children: media
8785
8791
  }), /*#__PURE__*/jsxs("div", {
8786
8792
  className: "wds-nudge-container",
8787
8793
  children: [/*#__PURE__*/jsxs("div", {
8788
8794
  className: "wds-nudge-content",
8789
- children: [isModern ? /*#__PURE__*/jsx(Body, {
8795
+ children: [/*#__PURE__*/jsx(Body, {
8790
8796
  type: Typography.BODY_LARGE,
8791
8797
  className: classNames('wds-nudge-body'),
8792
8798
  children: title
8793
- }) : /*#__PURE__*/jsx("div", {
8794
- className: "wds-nudge-title",
8795
- children: title
8796
8799
  }), link && /*#__PURE__*/jsx(Link, {
8797
8800
  href: href,
8798
8801
  type: Typography.LINK_LARGE,