feat(Toast): add Toast nearly identical to ChatGPT's (#1108)

This commit is contained in:
Danny Avila 2023-10-27 15:48:05 -04:00 committed by GitHub
parent ba5ab86037
commit 81a90d245b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 281 additions and 3 deletions

View file

@ -4,6 +4,7 @@ import endpoints from './endpoints';
import models from './models';
import user from './user';
import text from './text';
import toast from './toast';
import submission from './submission';
import search from './search';
import preset from './preset';
@ -17,6 +18,7 @@ export default {
...models,
...user,
...text,
...toast,
...submission,
...search,
...preset,

14
client/src/store/toast.ts Normal file
View file

@ -0,0 +1,14 @@
import { atom } from 'recoil';
import { NotificationSeverity } from '~/common';
const toastState = atom({
key: 'toastState',
default: {
open: false,
message: '',
severity: NotificationSeverity.SUCCESS,
showIcon: true,
},
});
export default { toastState };