mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 06:18:07 +01:00
b2d67fbe33
Port b93ffb74bb
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
19 lines
571 B
TypeScript
19 lines
571 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;
|
|
}
|
|
export const openModal = createAction<OpenModalPayload>('MODAL_OPEN');
|
|
|
|
interface CloseModalPayload {
|
|
modalType: ModalType | undefined;
|
|
ignoreFocus: boolean;
|
|
}
|
|
export const closeModal = createAction<CloseModalPayload>('MODAL_CLOSE');
|