spee.ch/react/actions/index.js
2018-01-08 17:46:17 -08:00

26 lines
467 B
JavaScript

// export action types
export const FILE_SELECTED = 'FILE_SELECTED';
export const FILE_CLEAR = 'FILE_CLEAR';
export const METADATA_UPDATE = 'TITLE_UPDATE';
// export action creators
export function selectFile (file) {
return {
type: FILE_SELECTED,
file: file,
};
};
export function clearFile () {
return {
type: FILE_CLEAR,
};
};
export function updateMetadata (name, value) {
return {
type: METADATA_UPDATE,
name,
value,
};
};