@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.
- package/build/index.esm.js +15 -12
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -12
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/header/Header.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/types/header/Header.d.ts +1 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts +3 -10
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/title/Title.d.ts +1 -1
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/header/Header.css +1 -1
- package/src/header/Header.less +5 -0
- package/src/header/Header.tsx +21 -2
- package/src/main.css +1 -1
- package/src/nudge/Nudge.css +1 -1
- package/src/nudge/Nudge.less +18 -22
- package/src/nudge/Nudge.spec.tsx +0 -18
- package/src/nudge/Nudge.story.tsx +31 -0
- package/src/nudge/Nudge.tsx +28 -36
- package/src/title/Title.tsx +1 -1
package/build/index.esm.js
CHANGED
|
@@ -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
|
-
}),
|
|
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: [
|
|
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: [
|
|
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,
|