joyce/src/actions/inputActions.js
2019-07-29 21:42:50 -07:00

32 lines
736 B
JavaScript

// -------------
// Input Actions
// -------------
// These actions handle states for the non-DraftJS input elements
const inputActions = {
// Handle changes to the document title input box
updateDocumentTitleInput: input =>
({
type: 'UPDATE_DOCUMENT_TITLE',
data: input.target.value
}),
updateColorPickerInput: input =>
({
type: 'UPDATE_COLOR_PICKER',
data: input.target.value
}),
// Handle changes to the search input box
updateSearchInput: input =>
({
type: 'UPDATE_SEARCH_INPUT',
data: input.target.value
}),
// Handle changes to the file upload input for media docs
updateMediaInput: input =>
({
type: 'UPDATE_MEDIA_INPUT',
data: input.target.files
})
}
export default inputActions