Skip to content

Commit

Permalink
⭐️ Impl: Types - Add Types for ModalContext
Browse files Browse the repository at this point in the history
TODO:2023-03-04-04-20-46 - Library Typescript Re-Write
  • Loading branch information
dominicstop committed Mar 3, 2023
1 parent 9c29923 commit 3c86820
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/context/ModalContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
import React from 'react';
import type { ModalView } from 'src/components/ModalView';

export const ModalContext = React.createContext({});
export type ModalContextType = Partial<
Pick<
ModalView,
| 'getEmitterRef'
| 'setVisibility'
| 'setEnableSwipeGesture'
| 'setIsModalInPresentation'
> & {
getModalRef: ModalView['_handleGetModalRef'];
}
>;

export const ModalContext = React.createContext<ModalContextType>({});

0 comments on commit 3c86820

Please sign in to comment.