@pinnacle0/web-ui 0.6.13 → 0.6.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinnacle0/web-ui",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "author": "Pinnacle",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
- import type { ArgsProps as NotificationOptions } from "antd/es/notification/interface";
2
+ import type { ArgsProps as NotificationOptions, GlobalConfigProps } from "antd/es/notification/interface";
3
+ export type { GlobalConfigProps };
3
4
  declare function create(options: NotificationOptions): void;
4
5
  declare function destroy(): void;
5
- declare function Root(): React.ReactElement;
6
+ declare function Root(config?: GlobalConfigProps): React.ReactElement;
6
7
  export declare const NotificationUtil: Readonly<{
7
8
  create: typeof create;
8
9
  destroy: typeof destroy;
9
10
  Root: typeof Root;
10
11
  }>;
11
- export {};
@@ -12,8 +12,8 @@ function create(options) {
12
12
  function destroy() {
13
13
  notification.destroy();
14
14
  }
15
- function Root() {
16
- const [apiInstance, contextHolder] = notification.useNotification();
15
+ function Root(config) {
16
+ const [apiInstance, contextHolder] = notification.useNotification(config);
17
17
  React.useEffect(() => {
18
18
  if (notificationInstance) {
19
19
  throw new Error("[web-ui] NotificationUtil.Root cannot be mounted more than once");
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationUtil.js","sourceRoot":"","sources":["../../src/util/NotificationUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAGhD,IAAI,oBAAoB,GAAgC,IAAI,CAAC;AAE7D,SAAS,MAAM,CAAC,OAA4B;IACxC,IAAI,oBAAoB,EAAE,CAAC;QACvB,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;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