@jobber/components 2.80.2 → 2.81.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/CHANGELOG.md +11 -0
- package/dist/Banner/index.js +10 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,17 @@ menu: Changelog
|
|
|
8
8
|
All notable changes to this project will be documented in this file.
|
|
9
9
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
10
10
|
|
|
11
|
+
# [2.81.0](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.80.2...@jobber/components@2.81.0) (2022-04-21)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **components:** only wrap Banner children in Text if they are a simple string. ([#881](https://github.com/GetJobber/atlantis/issues/881)) ([58a8ac3](https://github.com/GetJobber/atlantis/commit/58a8ac31c0fd4f5f0ae53f30de5f976149dddc5f))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
11
22
|
## [2.80.2](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.80.1...@jobber/components@2.80.2) (2022-04-18)
|
|
12
23
|
|
|
13
24
|
**Note:** Version bump only for package @jobber/components
|
package/dist/Banner/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function Banner(_a) {
|
|
|
57
57
|
_c));
|
|
58
58
|
return (React__default.createElement(React__default.Fragment, null, showFlash && (React__default.createElement("div", { className: flashClassNames, ref: bannerRef, role: type === "error" ? "alert" : "status" },
|
|
59
59
|
React__default.createElement("div", { className: contentClassNames },
|
|
60
|
-
React__default.createElement(
|
|
60
|
+
React__default.createElement(BannerChildren, null, children),
|
|
61
61
|
primaryAction && (React__default.createElement("div", { className: styles.bannerAction },
|
|
62
62
|
React__default.createElement(index$5.Button, __chunk_1.__assign({}, primaryAction))))),
|
|
63
63
|
dismissible && (React__default.createElement("button", { className: styles.closeButton, onClick: handleClose, "aria-label": "Close this notification" },
|
|
@@ -66,6 +66,15 @@ function Banner(_a) {
|
|
|
66
66
|
setShowFlash(!showFlash);
|
|
67
67
|
onDismiss && onDismiss();
|
|
68
68
|
}
|
|
69
|
+
}
|
|
70
|
+
function BannerChildren(_a) {
|
|
71
|
+
var children = _a.children;
|
|
72
|
+
if (!children)
|
|
73
|
+
return React__default.createElement(React__default.Fragment, null);
|
|
74
|
+
if (children && typeof children === "string") {
|
|
75
|
+
return React__default.createElement(index$1.Text, null, children);
|
|
76
|
+
}
|
|
77
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
exports.Banner = Banner;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"> 1%",
|
|
86
86
|
"IE 10"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "3adfda6f8de7158fbc7d97c1c5a7c7ed654234f3"
|
|
89
89
|
}
|