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