Add keyboard shortcuts (#637)

* Add documentation
* Fix manual styling
* Add dialog for setting Movie images
* Mention manual in README
This commit is contained in:
WithoutPants
2020-07-02 08:45:14 +10:00
committed by GitHub
parent 3157d748bc
commit bfeb7d1824
23 changed files with 698 additions and 30 deletions

View File

@@ -0,0 +1,16 @@
import { useRef } from "react";
const useFocus = () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const htmlElRef = useRef<any>();
const setFocus = () => {
const currentEl = htmlElRef.current;
if (currentEl) {
currentEl.focus();
}
};
return [htmlElRef, setFocus] as const;
};
export default useFocus;