You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
463 B

export const TROGGLE_ACTION = 'TROGGLE_ACTION';
export const CREATE = 'CREATE';
export const MOVE = 'MOVE';
export const CLEAR_ALL = 'CLEAR_ALL';
export const create = (x, y) => ({
type: TROGGLE_ACTION,
action: CREATE,
x: x,
y: y
});
export const move = (index, x, y) => ({
type: TROGGLE_ACTION,
action: MOVE,
index: index,
x: x,
y: y
});
export const clearAll = () => ({
type: TROGGLE_ACTION,
action: CLEAR_ALL
});