@transferwise/components 46.44.0 → 46.44.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/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -1
- package/build/index.mjs.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/inlineAlert/InlineAlert.spec.tsx +7 -0
- package/src/inlineAlert/InlineAlert.tsx +9 -3
package/build/index.js
CHANGED
|
@@ -4865,6 +4865,7 @@ const Emphasis = ({
|
|
|
4865
4865
|
}) : null;
|
|
4866
4866
|
};
|
|
4867
4867
|
|
|
4868
|
+
const iconTypes = new Set([exports.Sentiment.NEGATIVE, exports.Sentiment.ERROR, exports.Sentiment.POSITIVE, exports.Sentiment.SUCCESS, exports.Sentiment.WARNING]);
|
|
4868
4869
|
function InlineAlert({
|
|
4869
4870
|
id,
|
|
4870
4871
|
type = 'neutral',
|
|
@@ -4875,7 +4876,7 @@ function InlineAlert({
|
|
|
4875
4876
|
role: "alert",
|
|
4876
4877
|
id: id,
|
|
4877
4878
|
className: classNames__default.default('alert alert-detach', `alert-${type === exports.Sentiment.NEGATIVE || type === exports.Sentiment.ERROR ? 'danger' : type}`, className),
|
|
4878
|
-
children: [
|
|
4879
|
+
children: [iconTypes.has(type) && /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
4879
4880
|
sentiment: type,
|
|
4880
4881
|
size: exports.Size.SMALL
|
|
4881
4882
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|