@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.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
|
});
|