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
+1
View File
@@ -15,6 +15,7 @@ export * from './ui/lottie/collections-icon';
export * from './ui/lottie/delete-icon';
export * from './ui/menu';
export * from './ui/modal';
export * from './ui/notification';
export * from './ui/popover';
export * from './ui/scrollbar';
export * from './ui/skeleton';