useFocusTrap

useFocusTrap

import useFocusTrap from "@kiwicom/orbit-components/lib/hooks/useFocusTrap";
const Component = (props: Props) => {
const ref = React.useRef(null);
useFocusTrap(ref);
return <OtherComponent ref={ref}>...etc</OtherComponent>;
};

Props

NameTypeDescription
reffuncComponent reference