Skip to content

Commit

Permalink
fix: updated Portal handling types
Browse files Browse the repository at this point in the history
  • Loading branch information
Mo Gorhom committed Oct 18, 2021
1 parent a3fa06e commit 8eba3ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/portal/Portal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const PortalComponent = ({
//#endregion

//#region refs
const handleOnMountRef = useRef<typeof _providedHandleOnMount>();
const handleOnUnmountRef = useRef<typeof _providedHandleOnUnmount>();
const handleOnUpdateRef = useRef<typeof _providedHandleOnUpdate>();
const handleOnMountRef = useRef<Function>();
const handleOnUnmountRef = useRef<Function>();
const handleOnUpdateRef = useRef<Function>();
//#endregion

//#region callbacks
Expand Down
6 changes: 3 additions & 3 deletions src/components/portal/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ export interface PortalProps {
* @type (mount?: () => void) => void
* @default undefined
*/
handleOnMount?: (mount?: () => void) => void;
handleOnMount?: (mount: () => void) => void;
/**
* Override internal un-mounting functionality, this is useful
* if you want to trigger any action before un-mounting the portal content.
* @type (unmount?: () => void) => void
* @default undefined
*/
handleOnUnmount?: (unmount?: () => void) => void;
handleOnUnmount?: (unmount: () => void) => void;
/**
* Override internal updating functionality, this is useful
* if you want to trigger any action before updating the portal content.
* @type (update?: () => void) => void
* @default undefined
*/
handleOnUpdate?: (update?: () => void) => void;
handleOnUpdate?: (update: () => void) => void;
/**
* Portal's content.
* @type ReactNode
Expand Down

0 comments on commit 8eba3ea

Please sign in to comment.