@canonical/react-components 0.50.4 → 0.50.5

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.
@@ -49,7 +49,7 @@ const NotificationProvider = _ref => {
49
49
  queue: _messageBuilder.queue,
50
50
  failure: (title, error, message, actions) => setDeduplicated((0, _messageBuilder.failure)(title, error, message, actions)),
51
51
  info: (message, title) => setDeduplicated((0, _messageBuilder.info)(message, title)),
52
- success: message => setDeduplicated((0, _messageBuilder.success)(message)),
52
+ success: (message, title) => setDeduplicated((0, _messageBuilder.success)(message, title)),
53
53
  setDeduplicated
54
54
  };
55
55
  return /*#__PURE__*/_react.default.createElement(NotifyContext.Provider, {
@@ -2,5 +2,5 @@ import { NotificationAction, NotificationType, QueuedNotification } from "./type
2
2
  import { ReactNode } from "react";
3
3
  export declare const queue: (notification: NotificationType) => QueuedNotification;
4
4
  export declare const info: (message: ReactNode, title?: string) => NotificationType;
5
- export declare const success: (message: ReactNode) => NotificationType;
5
+ export declare const success: (message: ReactNode, title?: string) => NotificationType;
6
6
  export declare const failure: (title: string, error: unknown, message?: ReactNode, actions?: NotificationAction[]) => NotificationType;
@@ -23,9 +23,10 @@ const info = (message, title) => {
23
23
  };
24
24
  };
25
25
  exports.info = info;
26
- const success = message => {
26
+ const success = (message, title) => {
27
27
  return {
28
28
  message,
29
+ title,
29
30
  type: _Notification.NotificationSeverity.POSITIVE
30
31
  };
31
32
  };
@@ -29,7 +29,7 @@ export interface NotificationHelper {
29
29
  clear: () => void;
30
30
  failure: (title: string, error: unknown, message?: ReactNode, actions?: NotificationAction[]) => NotificationType;
31
31
  info: (message: ReactNode, title?: string) => NotificationType;
32
- success: (message: ReactNode) => NotificationType;
32
+ success: (message: ReactNode, title?: string) => NotificationType;
33
33
  queue: (notification: NotificationType) => QueuedNotification;
34
34
  setDeduplicated: (value: NotificationType) => NotificationType;
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "0.50.4",
3
+ "version": "0.50.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "Huw Wilkins <huw.wilkins@canonical.com>",