mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user