We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d33c01d commit ab93dadCopy full SHA for ab93dad
typescript-packages/client/src/index.ts
@@ -16,3 +16,21 @@ import Toaster from './hooks/toaster-hook';
16
export const errorBoundaryHook: ErrorBoundaryHook = new ErrorBoundaryHook();
17
export const routerHook: RouterHook = new RouterHook();
18
export const toaster: Toaster = new Toaster();
19
+
20
+export interface Plugin {
21
+ version?: string;
22
+ icon: JSX.Element;
23
+ content?: JSX.Element;
24
+ onDismount?(): void;
25
+ alwaysRender?: boolean;
26
+ titleView?: JSX.Element;
27
+}
28
29
+export type DefinePluginFn = () => Plugin;
30
31
+export const definePlugin = (fn: DefinePluginFn): DefinePluginFn => {
32
+ return (...args) => {
33
+ // TODO: Maybe wrap this
34
+ return fn(...args);
35
+ };
36
+};
0 commit comments