@sb1/ffe-system-message-react 6.2.16 → 6.4.1
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/lib/SystemMessage.js +9 -3
- package/package.json +7 -13
- package/types/index.d.ts +1 -0
package/lib/SystemMessage.js
CHANGED
|
@@ -15,7 +15,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
15
15
|
|
|
16
16
|
var _kryssIkon = _interopRequireDefault(require("@sb1/ffe-icons-react/lib/kryss-ikon"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["animationLengthMs", "children", "className", "icon", "locale", "modifier"];
|
|
18
|
+
var _excluded = ["animationLengthMs", "children", "className", "icon", "locale", "modifier", "onColoredBg"];
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -101,6 +101,7 @@ var SystemMessage = /*#__PURE__*/function (_Component) {
|
|
|
101
101
|
icon = _this$props2.icon,
|
|
102
102
|
locale = _this$props2.locale,
|
|
103
103
|
modifier = _this$props2.modifier,
|
|
104
|
+
onColoredBg = _this$props2.onColoredBg,
|
|
104
105
|
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
105
106
|
|
|
106
107
|
if (this.state.closed) {
|
|
@@ -108,7 +109,9 @@ var SystemMessage = /*#__PURE__*/function (_Component) {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
111
|
-
className: (0, _classnames.default)('ffe-system-message-wrapper', "ffe-system-message-wrapper--".concat(modifier),
|
|
112
|
+
className: (0, _classnames.default)('ffe-system-message-wrapper', "ffe-system-message-wrapper--".concat(modifier), {
|
|
113
|
+
'ffe-system-message-wrapper--coloredbg': onColoredBg
|
|
114
|
+
}, className),
|
|
112
115
|
ref: function ref(_self) {
|
|
113
116
|
_this3._self = _self;
|
|
114
117
|
},
|
|
@@ -164,7 +167,10 @@ SystemMessage.propTypes = {
|
|
|
164
167
|
modifier: (0, _propTypes.oneOf)(['error', 'info', 'success', 'news']),
|
|
165
168
|
|
|
166
169
|
/** Callback for when the system message has been closed (after animation ends) */
|
|
167
|
-
onClose: _propTypes.func
|
|
170
|
+
onClose: _propTypes.func,
|
|
171
|
+
|
|
172
|
+
/* Adds alternative styling for better contrast on certain backgrounds */
|
|
173
|
+
onColoredBg: _propTypes.bool
|
|
168
174
|
};
|
|
169
175
|
var _default = SystemMessage;
|
|
170
176
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-system-message-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"description": "SpareBank 1 System Message komponent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -19,23 +19,17 @@
|
|
|
19
19
|
"build": "ffe-buildtool babel",
|
|
20
20
|
"watch": "ffe-buildtool babel-watch",
|
|
21
21
|
"lint": "eslint src",
|
|
22
|
-
"test": "jest",
|
|
23
|
-
"test:watch": "jest --watch"
|
|
24
|
-
},
|
|
25
|
-
"jest": {
|
|
26
|
-
"setupTestFrameworkScriptFile": "../../test-setup.js"
|
|
22
|
+
"test": "ffe-buildtool jest",
|
|
23
|
+
"test:watch": "ffe-buildtool jest --watch"
|
|
27
24
|
},
|
|
28
25
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-grid-react": "^11.1.
|
|
26
|
+
"@sb1/ffe-grid-react": "^11.1.6",
|
|
30
27
|
"classnames": "^2.3.1",
|
|
31
28
|
"prop-types": "^15.7.2"
|
|
32
29
|
},
|
|
33
30
|
"devDependencies": {
|
|
34
|
-
"@sb1/ffe-buildtool": "^0.
|
|
35
|
-
"@sb1/ffe-icons-react": "^7.
|
|
36
|
-
"enzyme": "^3.7.0",
|
|
37
|
-
"enzyme-adapter-react-16": "^1.7.0",
|
|
38
|
-
"jest": "^26.0.0",
|
|
31
|
+
"@sb1/ffe-buildtool": "^0.4.0",
|
|
32
|
+
"@sb1/ffe-icons-react": "^7.3.1",
|
|
39
33
|
"react": "^16.9.0",
|
|
40
34
|
"react-dom": "^16.9.0"
|
|
41
35
|
},
|
|
@@ -47,5 +41,5 @@
|
|
|
47
41
|
"publishConfig": {
|
|
48
42
|
"access": "public"
|
|
49
43
|
},
|
|
50
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "e900240c8817faf27fdccbc479905958b4c5aa79"
|
|
51
45
|
}
|
package/types/index.d.ts
CHANGED