mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-17 04:13:01 +00:00
382b2a506a
Port 38c6216082
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
18 lines
501 B
TypeScript
18 lines
501 B
TypeScript
import { createAction } from '@reduxjs/toolkit';
|
|
|
|
import type { MODAL_COMPONENTS } from '../features/ui/components/modal_root';
|
|
|
|
export type ModalType = keyof typeof MODAL_COMPONENTS;
|
|
|
|
interface OpenModalPayload {
|
|
modalType: ModalType;
|
|
modalProps: unknown;
|
|
}
|
|
export const openModal = createAction<OpenModalPayload>('MODAL_OPEN');
|
|
|
|
interface CloseModalPayload {
|
|
modalType: ModalType | undefined;
|
|
ignoreFocus: boolean;
|
|
}
|
|
export const closeModal = createAction<CloseModalPayload>('MODAL_CLOSE');
|