Use react-toolbox buttons. Added Cancel button for the entry editor.

This commit is contained in:
Andrey Okonetchnikov
2016-10-11 18:24:55 +02:00
parent 6fa02bf79b
commit 190aa05d68
4 changed files with 64 additions and 22 deletions

View File

@ -1,8 +1,16 @@
import history from '../routing/history';
export const SWITCH_VISUAL_MODE = 'SWITCH_VISUAL_MODE';
export function switchVisualMode(useVisualMode) {
return {
type: SWITCH_VISUAL_MODE,
payload: useVisualMode
payload: useVisualMode,
};
}
export function cancelEdit() {
return () => {
history.goBack();
};
}