react-cool-portal
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -9,2 +9,8 @@ declare module "react-cool-portal" { | ||
export interface OnShow<T extends SyntheticEvent | Event = ReactMouseEvent> { | ||
(event: T): void; | ||
} | ||
export type OnHide = OnShow<ReactMouseEvent | MouseEvent | KeyboardEvent>; | ||
export interface RCPF<T extends SyntheticEvent | Event = ReactMouseEvent> { | ||
@@ -14,4 +20,2 @@ (event?: T): void; | ||
type Portal = FC<{ children: ReactNode }>; | ||
interface Args { | ||
@@ -23,8 +27,8 @@ containerId?: string; | ||
internalShowHide?: boolean; | ||
onShow?: RCPF; | ||
onHide?: RCPF<ReactMouseEvent | MouseEvent | KeyboardEvent>; | ||
onShow?: OnShow; | ||
onHide?: OnHide; | ||
} | ||
interface Return { | ||
readonly Portal: Portal; | ||
readonly Portal: FC<{ children: ReactNode }>; | ||
readonly isShow: boolean; | ||
@@ -31,0 +35,0 @@ readonly show: RCPF; |
{ | ||
"name": "react-cool-portal", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body> or else.", | ||
@@ -154,3 +154,3 @@ "license": "MIT", | ||
"husky": "^4.2.3", | ||
"jest": "^25.1.0", | ||
"jest": "^26.0.1", | ||
"lint-staged": "^10.0.8", | ||
@@ -178,3 +178,3 @@ "normalize.css": "^8.0.1", | ||
"stylelint-prettier": "^1.1.2", | ||
"ts-jest": "^25.2.1", | ||
"ts-jest": "^26.0.0", | ||
"typescript": "^3.8.3" | ||
@@ -181,0 +181,0 @@ }, |
27734
58