aboutsummaryrefslogtreecommitdiff
path: root/src/shared/actions.js
blob: 2e1081098438d04114a38f9dbcbca3fb0e513416 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
};