console state as action/reducer in redux
This commit is contained in:
parent
8593b3f5cd
commit
e8056d2a70
6 changed files with 129 additions and 84 deletions
28
src/actions/console.js
Normal file
28
src/actions/console.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
import actions from '../actions';
|
||||
|
||||
export function showCommand(text) {
|
||||
return {
|
||||
type: actions.CONSOLE_SHOW_COMMAND,
|
||||
text: text
|
||||
};
|
||||
}
|
||||
|
||||
export function setCompletions(completions) {
|
||||
return {
|
||||
type: actions.CONSOLE_SET_COMPLETIONS,
|
||||
completions: completions
|
||||
};
|
||||
}
|
||||
|
||||
export function showError(text) {
|
||||
return {
|
||||
type: actions.CONSOLE_SHOW_ERROR,
|
||||
text: text
|
||||
};
|
||||
}
|
||||
|
||||
export function hide() {
|
||||
return {
|
||||
type: actions.CONSOLE_HIDE
|
||||
};
|
||||
}
|
Reference in a new issue