Choices/src/scripts/src/actions/items.js

33 lines
441 B
JavaScript
Raw Normal View History

2017-10-10 16:26:38 +02:00
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,
});