feat: support gif toast (#3389)

This commit is contained in:
JimmFly authored and GitHub committed 2023-07-26 22:37:18 -07:00
1 parent fa8086d525
commit bc27412425
5 files changed
+137 -30

No files matched your search

@@ -12,6 +12,12 @@ export default {
} satisfies Meta<typeof NotificationCenter>;
let id = 0;
const image = (
<video autoPlay muted loop>
<source src="/editingVideo.mp4" type="video/mp4" />
<source src="/editingVideo.webm" type="video/webm" />
</video>
);
export const Basic = () => {
const push = useSetAtom(pushNotificationAtom);
const expand = useAtomValue(expandNotificationCenterAtom);
@@ -196,6 +202,27 @@ export const Basic = () => {
dark error
</button>
</div>
<div>
<button
onClick={() => {
const key = id++;
push({
key: `${key}`,
title: `${key} title`,
message: `gif test`,
type: 'info',
multimedia: image,
timeout: 3000,
undo: async () => {
console.log('undo');
},
progressingBar: true,
});
}}
>
gif
</button>
</div>
<NotificationCenter />
</>
);