@synerise/ds-alert 0.4.7 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
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.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.5.1...@synerise/ds-alert@0.5.2) (2022-03-21)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-alert
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.5.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.5.0...@synerise/ds-alert@0.5.1) (2022-03-14)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-alert
17
+
18
+
19
+
20
+
21
+
22
+ # [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)
23
+
24
+
25
+ ### Features
26
+
27
+ * **alert:** add customIcon prop to IconAlert ([afa5817](https://github.com/Synerise/synerise-design/commit/afa5817d0b8e2ebc80b69337998fb1e3c55a0259))
28
+ * **alert:** add tests to IconAlert ([e3bfe24](https://github.com/Synerise/synerise-design/commit/e3bfe240f322cc36aa8703e715cbd458f7b73649))
29
+
30
+
31
+
32
+
33
+
6
34
  ## [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
35
 
8
36
  **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.2",
4
4
  "description": "Alert UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,10 +32,10 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-button": "^0.16.6",
36
- "@synerise/ds-icon": "^0.47.2",
35
+ "@synerise/ds-button": "^0.17.1",
36
+ "@synerise/ds-icon": "^0.48.0",
37
37
  "@synerise/ds-typography": "^0.12.2",
38
- "@synerise/ds-unordered-list": "^0.2.7",
38
+ "@synerise/ds-unordered-list": "^0.2.9",
39
39
  "animate.css": "^4.1.1",
40
40
  "react-animate-height": "^2.0.23",
41
41
  "react-mount-animation": "0.0.9"
@@ -47,5 +47,5 @@
47
47
  "devDependencies": {
48
48
  "@synerise/ds-utils": "^0.19.0"
49
49
  },
50
- "gitHead": "d929307c17c9e6f63d7922df0497b45f041c4e76"
50
+ "gitHead": "233a9fede96c39eb8c5feeb5f58c635053ba875a"
51
51
  }