Skip to content

Commit

Permalink
feat(portal): add ts type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
grabkowski committed May 11, 2021
1 parent c127258 commit c769de8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/portal/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./portal";
14 changes: 14 additions & 0 deletions src/components/portal/portal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from "react";

export interface PortalProps {
/** The content of the portal. */
children?: React.ReactNode;
className?: string;
id?: string;
/** Callback function triggered when parent element is scrolled or window resized. */
onReposition?: () => void;
}

declare function Portal(props: PortalProps): JSX.Element;

export default Portal;

0 comments on commit c769de8

Please sign in to comment.