mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-09 08:22:11 -05:00
Port 11786f1114f9dfb5a17810d14477a94162f94064 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
21 lines
606 B
TypeScript
21 lines
606 B
TypeScript
import { createAction } from '@reduxjs/toolkit';
|
|
|
|
import type { ModalProps } from 'flavours/glitch/reducers/modal';
|
|
|
|
import type { MODAL_COMPONENTS } from '../features/ui/components/modal_root';
|
|
|
|
export type ModalType = keyof typeof MODAL_COMPONENTS;
|
|
|
|
interface OpenModalPayload {
|
|
modalType: ModalType;
|
|
modalProps: ModalProps;
|
|
previousModalProps?: ModalProps;
|
|
}
|
|
export const openModal = createAction<OpenModalPayload>('MODAL_OPEN');
|
|
|
|
interface CloseModalPayload {
|
|
modalType: ModalType | undefined;
|
|
ignoreFocus: boolean;
|
|
}
|
|
export const closeModal = createAction<CloseModalPayload>('MODAL_CLOSE');
|