diff --git a/package-lock.json b/package-lock.json index 8982c10..4c0cf54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-hooks-use-modal", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 13cfacf..247d9ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-hooks-use-modal", - "version": "2.0.0", + "version": "2.0.1", "author": "shibe97", "description": "A react hook which can open the modal with react-portal", "repository": { diff --git a/src/index.tsx b/src/index.tsx index 834763a..e158b80 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,7 +13,7 @@ export interface ModalOptions { preventScroll?: boolean; }; -export type UseModal = (elementId: string, options: ModalOptions) => [ +export type UseModal = (elementId: string, options?: ModalOptions) => [ ModalWrapper: React.FC<{children: React.ReactNode}>, open: () => void, close: () => void,