mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-09 01:12:15 +02:00
19 lines
362 B
JavaScript
19 lines
362 B
JavaScript
import { ACTION_TYPES } from '../constants';
|
|
|
|
/**
|
|
* @typedef {import('redux').Action} Action
|
|
* @typedef {import('../../../types/index').Choices.Group} Group
|
|
*/
|
|
|
|
/**
|
|
* @param {Group} group
|
|
* @returns {Action & Group}
|
|
*/
|
|
export const addGroup = ({ value, id, active, disabled }) => ({
|
|
type: ACTION_TYPES.ADD_GROUP,
|
|
value,
|
|
id,
|
|
active,
|
|
disabled,
|
|
});
|