mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-03 14:32:11 +02:00
28 lines
431 B
TypeScript
28 lines
431 B
TypeScript
import { ACTION_TYPES } from '../constants';
|
|
|
|
export interface AddGroupAction {
|
|
type: typeof ACTION_TYPES.ADD_GROUP;
|
|
id: number;
|
|
value: string;
|
|
active: boolean;
|
|
disabled: boolean;
|
|
}
|
|
|
|
export const addGroup = ({
|
|
value,
|
|
id,
|
|
active,
|
|
disabled,
|
|
}: {
|
|
id: number;
|
|
value: string;
|
|
active: boolean;
|
|
disabled: boolean;
|
|
}): AddGroupAction => ({
|
|
type: ACTION_TYPES.ADD_GROUP,
|
|
value,
|
|
id,
|
|
active,
|
|
disabled,
|
|
});
|