Extract context-menu view component
[arvados-workbench2.git] / src / store / context-menu / context-menu-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { default as unionize, ofType, UnionOf } from "unionize";
6 import { ContextMenuPosition, ContextMenuResource } from "./context-menu-reducer";
7
8 const actions = unionize({
9     OPEN_CONTEXT_MENU: ofType<{ position: ContextMenuPosition, resource: ContextMenuResource }>(),
10     CLOSE_CONTEXT_MENU: ofType<{}>()
11 }, {
12         tag: 'type',
13         value: 'payload'
14     });
15
16 export type ContextMenuAction = UnionOf<typeof actions>;
17 export default actions;