mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
photoswipe element
This commit is contained in:
parent
55c806ce21
commit
19aeb8a334
16 changed files with 260 additions and 58 deletions
|
@ -1,5 +1,11 @@
|
|||
import { IModalState } from '~/redux/modal/reducer';
|
||||
import { MODAL_ACTIONS } from '~/redux/modal/constants';
|
||||
import { IFile } from '../types';
|
||||
|
||||
export const modalSet = (modal: Partial<IModalState>) => ({
|
||||
type: MODAL_ACTIONS.SET,
|
||||
modal,
|
||||
});
|
||||
|
||||
export const modalSetShown = (is_shown: IModalState['is_shown']) => ({
|
||||
is_shown,
|
||||
|
@ -15,3 +21,9 @@ export const modalShowDialog = (dialog: IModalState['dialog']) => ({
|
|||
dialog,
|
||||
type: MODAL_ACTIONS.SHOW_DIALOG,
|
||||
});
|
||||
|
||||
export const modalShowPhotoswipe = (images: IFile[], index: number) => ({
|
||||
type: MODAL_ACTIONS.SHOW_PHOTOSWIPE,
|
||||
images,
|
||||
index,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue