@synerise/ds-alert 0.4.7 → 0.5.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 CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.5.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.4.7...@synerise/ds-alert@0.5.0) (2022-03-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * **alert:** add customIcon prop to IconAlert ([afa5817](https://github.com/Synerise/synerise-design/commit/afa5817d0b8e2ebc80b69337998fb1e3c55a0259))
12
+ * **alert:** add tests to IconAlert ([e3bfe24](https://github.com/Synerise/synerise-design/commit/e3bfe240f322cc36aa8703e715cbd458f7b73649))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [0.4.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.4.6...@synerise/ds-alert@0.4.7) (2022-02-25)
7
19
 
8
20
  **Note:** Version bump only for package @synerise/ds-alert
package/README.md CHANGED
@@ -95,6 +95,7 @@ import Alert from '@synerise/ds-alert'
95
95
  | withLink | prop to show highlited text | `React.ReactNode` | - |
96
96
  | iconAlert | prop to set custom icon | `boolean` | - |
97
97
  | hoverButton | prop to set hover state button | `boolean` | - |
98
+ | customIcon | prop to set custom icon | `React.ReactNode` | - |
98
99
 
99
100
 
100
101
  ### Alert.Toast
@@ -1,4 +1,4 @@
1
- var _excluded = ["type", "iconAlert", "message", "withLink", "withEmphasis", "hoverButton", "disabled"];
1
+ var _excluded = ["type", "iconAlert", "message", "withLink", "withEmphasis", "hoverButton", "disabled", "customIcon"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -23,6 +23,7 @@ var IconAlert = function IconAlert(_ref) {
23
23
  withEmphasis = _ref.withEmphasis,
24
24
  hoverButton = _ref.hoverButton,
25
25
  disabled = _ref.disabled,
26
+ customIcon = _ref.customIcon,
26
27
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
27
28
 
28
29
  var icon = React.useMemo(function () {
@@ -33,9 +34,9 @@ var IconAlert = function IconAlert(_ref) {
33
34
  disabled: disabled,
34
35
  hoverButton: hoverButton,
35
36
  className: "ds-inline-alert"
36
- }), iconAlert && /*#__PURE__*/React.createElement(Icon, {
37
+ }), iconAlert && (customIcon || /*#__PURE__*/React.createElement(Icon, {
37
38
  component: icon
38
- }), message && /*#__PURE__*/React.createElement(S.Message, null, message, withLink && /*#__PURE__*/React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && /*#__PURE__*/React.createElement(S.EmphasisWrapper, null, withEmphasis)));
39
+ })), message && /*#__PURE__*/React.createElement(S.Message, null, message, withLink && /*#__PURE__*/React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && /*#__PURE__*/React.createElement(S.EmphasisWrapper, null, withEmphasis)));
39
40
  };
40
41
 
41
42
  export default IconAlert;
@@ -8,4 +8,5 @@ export declare type IconAlertProps = {
8
8
  iconAlert?: boolean;
9
9
  hoverButton?: boolean;
10
10
  disabled?: boolean;
11
+ customIcon?: React.ReactNode;
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-alert",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "Alert UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -47,5 +47,5 @@
47
47
  "devDependencies": {
48
48
  "@synerise/ds-utils": "^0.19.0"
49
49
  },
50
- "gitHead": "d929307c17c9e6f63d7922df0497b45f041c4e76"
50
+ "gitHead": "a25755117a5824c9ec03e83af2d0ef6dcb3124cc"
51
51
  }