Skip to content

Commit

Permalink
Replaces FocusEvent with React.FocusEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
margolisj committed Sep 8, 2023
1 parent 25ac463 commit 42a1322
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@ import {
__experimentalUseFocusOutside as useFocusOutside,
} from '@wordpress/compose';

/**
* External dependencies
*/
import type { FocusEvent } from 'react';

export default createHigherOrderComponent(
( WrappedComponent ) => ( props ) => {
const [ handleFocusOutside, setHandleFocusOutside ] = useState<
undefined | ( ( event: FocusEvent ) => void )
undefined | ( ( event: React.FocusEvent ) => void )
>( undefined );

const bindFocusOutsideHandler = useCallback<
( node: FocusEvent ) => void
( node: React.FocusEvent ) => void
>(
( node: any ) =>
setHandleFocusOutside( () =>
Expand Down

0 comments on commit 42a1322

Please sign in to comment.