Choices/assets/scripts/src/actions/index.js

30 lines
489 B
JavaScript
Raw Normal View History

2016-04-12 15:31:07 +02:00
export const addItem = (value, id) => {
2016-03-30 16:04:21 +02:00
return {
type: 'ADD_ITEM',
value: value,
id: id
2016-03-30 16:04:21 +02:00
}
};
2016-03-30 16:04:21 +02:00
2016-04-12 15:31:07 +02:00
export const removeItem = (id) => {
2016-03-30 16:04:21 +02:00
return {
type: 'REMOVE_ITEM',
id: id
2016-03-30 16:04:21 +02:00
}
};
2016-03-30 16:04:21 +02:00
2016-04-12 15:31:07 +02:00
export const selectItem = (id, value) => {
2016-03-30 16:04:21 +02:00
return {
type: 'SELECT_ITEM',
id: id,
2016-03-30 16:04:21 +02:00
value: value
}
2016-04-12 15:31:07 +02:00
};
export const addOption = (value, id) => {
return {
type: 'ADD_OPTION',
value: value,
id: id
}
};