From 541449b1fced9eea15f415b023206b10724f5315 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 14:18:12 +0900 Subject: separate console --- src/console/actions/console.js | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/console/actions/console.js (limited to 'src/console/actions/console.js') diff --git a/src/console/actions/console.js b/src/console/actions/console.js new file mode 100644 index 0000000..01d9a9b --- /dev/null +++ b/src/console/actions/console.js @@ -0,0 +1,44 @@ +import actions from 'console/actions'; + +const showCommand = (text) => { + return { + type: actions.CONSOLE_SHOW_COMMAND, + text: text + }; +}; + +const showError = (text) => { + return { + type: actions.CONSOLE_SHOW_ERROR, + text: text + }; +}; + +const hide = () => { + return { + type: actions.CONSOLE_HIDE + }; +}; + +const setCompletions = (completions) => { + return { + type: actions.CONSOLE_SET_COMPLETIONS, + completions: completions + }; +}; + +const completionNext = () => { + return { + type: actions.CONSOLE_COMPLETION_NEXT, + }; +}; + +const completionPrev = () => { + return { + type: actions.CONSOLE_COMPLETION_PREV, + }; +}; + +export { + showCommand, showError, hide, setCompletions, completionNext, completionPrev +}; -- cgit v1.2.3