diff --git a/docs/HOOKS.md b/docs/HOOKS.md index af35cb03..48a15279 100644 --- a/docs/HOOKS.md +++ b/docs/HOOKS.md @@ -19,7 +19,7 @@ import React from 'react'; import { Modalize, useModalize } from 'react-native-modalize'; export const App = () => { - const { ref, open, close } = useModalize(); + const { ref, open, close, position } = useModalize(); // e.g. open(); diff --git a/src/utils/use-modalize.ts b/src/utils/use-modalize.ts index 11a7973a..7f9a0f10 100644 --- a/src/utils/use-modalize.ts +++ b/src/utils/use-modalize.ts @@ -14,5 +14,7 @@ export const useModalize = () => { ref.current?.open(dest); }, []); - return { ref, open, close }; + const position = ref.current?.modalPosition; + + return { ref, open, close, position }; };