@transferwise/components 45.22.0 → 45.23.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 +13 -1
- package/build/index.esm.js.map +1 -1
- package/build/index.js +13 -1
- 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/types/header/Header.d.ts +1 -1
- package/build/types/header/Header.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/title/Title.tsx +1 -1
package/build/index.js
CHANGED
|
@@ -5885,6 +5885,18 @@ const Header = ({
|
|
|
5885
5885
|
title,
|
|
5886
5886
|
className
|
|
5887
5887
|
}) => {
|
|
5888
|
+
if (!action) {
|
|
5889
|
+
return /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
5890
|
+
as: as,
|
|
5891
|
+
type: exports.Typography.TITLE_GROUP,
|
|
5892
|
+
className: classNames__default.default('np-header', 'np-header__title', className),
|
|
5893
|
+
children: title
|
|
5894
|
+
});
|
|
5895
|
+
}
|
|
5896
|
+
if (as === 'legend') {
|
|
5897
|
+
// eslint-disable-next-line no-console
|
|
5898
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
5899
|
+
}
|
|
5888
5900
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5889
5901
|
className: classNames__default.default('np-header', className),
|
|
5890
5902
|
children: [/*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
@@ -5892,7 +5904,7 @@ const Header = ({
|
|
|
5892
5904
|
type: exports.Typography.TITLE_GROUP,
|
|
5893
5905
|
className: "np-header__title",
|
|
5894
5906
|
children: title
|
|
5895
|
-
}),
|
|
5907
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HeaderAction, {
|
|
5896
5908
|
action: action
|
|
5897
5909
|
})]
|
|
5898
5910
|
});
|