@sap-ux/ui-components 1.0.11 → 1.0.12
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/dist/components/UIMessageBar/UIMessageBar.d.ts.map +1 -1
- package/dist/components/UIMessageBar/UIMessageBar.js +4 -7
- package/dist/components/UIMessageBar/UIMessageBar.js.map +1 -1
- package/package.json +1 -1
- package/storybook/iframe.html +1 -1
- package/storybook/{main.5690bb34.iframe.bundle.js → main.ec4ea9cc.iframe.bundle.js} +3 -3
- package/storybook/project.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/UIMessageBar/UIMessageBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAI7D,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;IACnE;;;;OAIG;gBACgB,KAAK,EAAE,gBAAgB;IAI1C,SAAS,CAAC,QAAQ,UAAW,gBAAgB,KAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"UIMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/UIMessageBar/UIMessageBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAI7D,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;IACnE;;;;OAIG;gBACgB,KAAK,EAAE,gBAAgB;IAI1C,SAAS,CAAC,QAAQ,UAAW,gBAAgB,KAAG,iBAAiB,CAmB/D;IAEF;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,OAAO;CAQxB"}
|
|
@@ -25,12 +25,10 @@ class UIMessageBar extends react_1.default.Component {
|
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super(props);
|
|
27
27
|
this.setStyle = (props) => {
|
|
28
|
+
const { messageBarType } = props;
|
|
28
29
|
return {
|
|
29
30
|
root: {
|
|
30
|
-
...(
|
|
31
|
-
backgroundColor: 'transparent'
|
|
32
|
-
}),
|
|
33
|
-
...(props.messageBarType === react_2.MessageBarType.success && {
|
|
31
|
+
...((messageBarType === react_2.MessageBarType.error || messageBarType === react_2.MessageBarType.success) && {
|
|
34
32
|
backgroundColor: 'transparent'
|
|
35
33
|
})
|
|
36
34
|
},
|
|
@@ -51,9 +49,8 @@ class UIMessageBar extends react_1.default.Component {
|
|
|
51
49
|
* @returns {JSX.Element}
|
|
52
50
|
*/
|
|
53
51
|
render() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
: { iconName: Icons_1.UiIcons.Success }, styles: this.setStyle(this.props) }, this.props.children));
|
|
52
|
+
const iconName = this.props.messageBarType === react_2.MessageBarType.error ? Icons_1.UiIcons.Error : Icons_1.UiIcons.Success;
|
|
53
|
+
return (react_1.default.createElement(react_2.MessageBar, { ...this.props, messageBarIconProps: { iconName }, styles: this.setStyle(this.props) }, this.props.children));
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
exports.UIMessageBar = UIMessageBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIMessageBar.js","sourceRoot":"","sources":["../../../src/components/UIMessageBar/UIMessageBar.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,2CAA6D;A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AAC,eAAO,CAAC,OAAO,CAAC;QACtG,OAAO,CACH,8BAAC,kBAAU,OAAK,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAC3F,IAAI,CAAC,KAAK,CAAC,QAAQ,CACX,CAChB,CAAC;IACN,CAAC;CACJ;AA1CD,oCA0CC"}
|
package/package.json
CHANGED
package/storybook/iframe.html
CHANGED
|
@@ -377,4 +377,4 @@
|
|
|
377
377
|
|
|
378
378
|
|
|
379
379
|
|
|
380
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./stories","files":"*.story.tsx","importPathMatcher":"^\\.[\\\\/](?:stories\\/(?!\\.)(?=.)[^/]*?\\.story\\.tsx)$"}];</script><script src="runtime~main.3e35adfa.iframe.bundle.js"></script><script src="93.546e1b61.iframe.bundle.js"></script><script src="main.
|
|
380
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./stories","files":"*.story.tsx","importPathMatcher":"^\\.[\\\\/](?:stories\\/(?!\\.)(?=.)[^/]*?\\.story\\.tsx)$"}];</script><script src="runtime~main.3e35adfa.iframe.bundle.js"></script><script src="93.546e1b61.iframe.bundle.js"></script><script src="main.ec4ea9cc.iframe.bundle.js"></script></body></html>
|