diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/actions.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/shared/actions.js b/src/shared/actions.js new file mode 100644 index 0000000..2e10810 --- /dev/null +++ b/src/shared/actions.js @@ -0,0 +1,22 @@ +export const TABS_PREV = 'tabs.prev'; +export const TABS_NEXT = 'tabs.next'; +export const SCROLL_UP = 'scroll.up'; +export const SCROLL_DOWN = 'scroll.down'; + +const BACKGROUND_ACTION_SET = new Set([ + TABS_PREV, + TABS_NEXT +]); + +const CONTENT_ACTION_SET = new Set([ + SCROLL_UP, + SCROLL_DOWN +]); + +export const isBackgroundAction = (action) => { + return BACKGROUND_ACTION_SET.has(action); +}; + +export const isContentAction = (action) => { + return CONTENT_ACTION_SET.has(action); +}; |