Choices/src/scripts/src/actions/items.js
2017-10-10 15:26:38 +01:00

33 lines
441 B
JavaScript

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