about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/modal.jsx
blob: d19218c485ebe223eac9eb2b664ffd482b9eed70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export const MEDIA_OPEN  = 'MEDIA_OPEN';
export const MODAL_CLOSE = 'MODAL_CLOSE';

export const MODAL_INDEX_DECREASE = 'MODAL_INDEX_DECREASE';
export const MODAL_INDEX_INCREASE = 'MODAL_INDEX_INCREASE';

export function openMedia(media, index) {
  return {
    type: MEDIA_OPEN,
    media,
    index
  };
};

export function closeModal() {
  return {
    type: MODAL_CLOSE
  };
};

export function decreaseIndexInModal() {
  return {
    type: MODAL_INDEX_DECREASE
  };
};

export function increaseIndexInModal() {
  return {
    type: MODAL_INDEX_INCREASE
  };
};