refactor(component): new notification center implemented with sonner (#6416)

The Notification has been reimplemented using sooner, no longer relies on jotai, and new story has been added.

- Before
  ```ts
  import { pushNotificationAtom } from '@affine/component/notification-center';
  import { useSetAtom } from 'jotai';

  export const Component = () => {
    const pushNotification = useSetAtom(pushNotificationAtom);
    pushNotification({ ... });
  }
  ```

- After
  ```ts
  import { notify } from "@affine/component";

  export const Component = () => {
    notify({ ... });
  }
  ```
This commit is contained in:
CatsJuice
2024-04-02 03:18:56 +00:00
parent 80c7750f4a
commit a4cd51e503
10 changed files with 583 additions and 0 deletions

View File

@@ -69,6 +69,7 @@
"react-transition-state": "^2.1.1",
"react-virtuoso": "^4.7.0",
"rxjs": "^7.8.1",
"sonner": "^1.4.41",
"swr": "^2.2.5",
"uuid": "^9.0.1",
"zod": "^3.22.4"