10 lines
366 B
TypeScript
10 lines
366 B
TypeScript
import { createContext } from "react";
|
|
import type { NullOr } from "../../types";
|
|
import type { UnsavedChangesNotifierProps } from "./use-unsaved-changes-notifier";
|
|
|
|
export interface IUnsavedWarnContextState {
|
|
show: (options: NullOr<UnsavedChangesNotifierProps>) => void;
|
|
}
|
|
|
|
export const UnsavedWarnContext = createContext<NullOr<IUnsavedWarnContextState>>(null);
|