Merge ErrorsStore into UiStore

This commit is contained in:
Tom Moor
2018-05-31 11:42:39 -07:00
parent 55e1451160
commit f633f63a61
18 changed files with 105 additions and 158 deletions

View File

@@ -11,6 +11,7 @@ class UiStore {
@observable progressBarVisible: boolean = false;
@observable editMode: boolean = false;
@observable mobileSidebarVisible: boolean = false;
@observable toasts: string[] = observable.array([]);
/* Actions */
@action
@@ -79,6 +80,16 @@ class UiStore {
hideMobileSidebar() {
this.mobileSidebarVisible = false;
}
@action
showToast = (message: string): void => {
this.toasts.push(message);
};
@action
removeToast = (index: number): void => {
this.toasts.splice(index, 1);
};
}
export default UiStore;