joyce/src/actions/inputActions.js

26 lines
578 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
})
}
export default inputActions