ente/web/packages/base/context.ts
Manav Rathi 7138510e48
Rename
2025-02-14 14:01:56 +05:30

21 lines
697 B
TypeScript

import type { MiniDialogAttributes } from "@/base/components/MiniDialog";
/**
* The type of the context expected to be present in the React tree for all apps
* that use the base package.
*/
export interface BaseContextT {
/**
* Perform the (possibly app specific) logout sequence.
*/
logout: () => void;
/**
* Show a "mini dialog" with the given attributes.
*
* Mini dialogs (see {@link AttributedMiniDialog}) are meant for simple
* confirmation or notications. Their appearance and functionality can be
* customized by providing appropriate {@link MiniDialogAttributes}.
*/
showMiniDialog: (attributes: MiniDialogAttributes) => void;
}