@sky-mavis/tanto-widget
Version:
Tanto Widget
18 lines (17 loc) • 550 B
TypeScript
import { ReactNode } from 'react';
import { Prettify } from 'viem';
import { Route } from '../../types/route';
export interface View {
route: Route;
title?: ReactNode;
content: ReactNode;
showBackButton?: boolean;
}
export interface WidgetRouterState {
view: View;
history: View[];
goTo: (route: Route, options?: Prettify<Partial<Omit<View, 'route'>>>) => void;
goBack: () => void;
reset: (route?: Route) => void;
}
export declare const WidgetRouterContext: import("react").Context<WidgetRouterState | undefined>;