first commit
This commit is contained in:
13
src/component/Viewers/ImageViewer/react-photo-view/photo-context.ts
Executable file
13
src/component/Viewers/ImageViewer/react-photo-view/photo-context.ts
Executable file
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user