Skip to content

Commit

Permalink
Export usePopoverShouldClose from entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Jul 23, 2024
1 parent 6eb4d9b commit 487c251
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/test/use-popover-should-close-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from 'enzyme';
import { useRef } from 'preact/hooks';

import usePopoverShouldClose, { $imports } from '../use-popover-should-close';
import { usePopoverShouldClose, $imports } from '../use-popover-should-close';

describe('usePopoverShouldClose', () => {
function FakeComponent({ closeHandler, options }) {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-popover-should-close.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type UsePopoverShouldCloseOptions = {
* @param handleClose - Callback invoked to close the popover
* @param options
*/
export default function usePopoverShouldClose(
export function usePopoverShouldClose(
popoverEl: RefObject<HTMLElement | undefined>,
handleClose: () => void,
options: UsePopoverShouldCloseOptions = {},
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export { useClickAway } from './hooks/use-click-away';
export { useFocusAway } from './hooks/use-focus-away';
export { useKeyPress } from './hooks/use-key-press';
export { useOrderedRows } from './hooks/use-ordered-rows';
export { usePopoverShouldClose } from './hooks/use-popover-should-close';
export { useStableCallback } from './hooks/use-stable-callback';
export { useSyncedRef } from './hooks/use-synced-ref';
export { useToastMessages } from './hooks/use-toast-messages';
Expand Down

0 comments on commit 487c251

Please sign in to comment.