useFocusTarget
Returns a ref callback to put on the control that opens a surface, so focus
can come back to it: <IconButton ref={useFocusTarget("map-options")} />.
This is a function exported by @mapcairn/map, checked against version 0.2.0.
Signature
import { useFocusTarget } from "@mapcairn/map";
function useFocusTarget(name: FocusName): (element: HTMLElement | null) => void;
Parameters
name(FocusName)
Returns
(element: HTMLElement | null) => void