Files
leonpan-assets/src/component/Viewers/ImageViewer/react-photo-view/photo-context.ts
2025-10-19 13:31:11 +00:00

14 lines
384 B
TypeScript
Executable File

import { createContext } from "react";
import type { DataType } from "./types";
export type UpdateItemType = (dataType: DataType) => void;
export interface PhotoContextType {
show: (key: number) => void;
update: UpdateItemType;
remove: (key: number) => void;
nextId: () => number;
}
export default createContext<PhotoContextType>(undefined as unknown as PhotoContextType);