diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-13 17:30:18 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-13 17:30:18 +0900 |
commit | e45985088e0bbd041a567bab6b7665d2906528e4 (patch) | |
tree | 5e99b3f10e6b553b0f3b0d5afa811b6133bb9798 /src/shared/actions.js | |
parent | d169661e030e53b6a1635f86205f9fc42d2b7ef2 (diff) | |
parent | 41069cf527ed159d6c5ff89cc77867537025c9f5 (diff) |
Merge branch 'basic-features'
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); +}; |