Choices/src/scripts/actions/items.js
Josh Johnson f597bc9aff
Remove travis (#667)
* Remove travis.yml

* Remove versioning from index file

* Resolve linting issues

* Resolve further linting issues

* Uppercase NPM_TOKEN

* Run audit fix

* Update postversion command

* Update @babel/core to latest

* Update post version command

* Housekeeping

* Revert cypress upgrade

* Enforce cypress version

* Update package.lock

* Add cypress project id
2019-10-21 20:03:57 +01:00

35 lines
522 B
JavaScript

import { ACTION_TYPES } from '../constants';
export const addItem = ({
value,
label,
id,
choiceId,
groupId,
customProperties,
placeholder,
keyCode,
}) => ({
type: ACTION_TYPES.ADD_ITEM,
value,
label,
id,
choiceId,
groupId,
customProperties,
placeholder,
keyCode,
});
export const removeItem = (id, choiceId) => ({
type: ACTION_TYPES.REMOVE_ITEM,
id,
choiceId,
});
export const highlightItem = (id, highlighted) => ({
type: ACTION_TYPES.HIGHLIGHT_ITEM,
id,
highlighted,
});