Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: convert useListenFocusTriggers stories file to TS #2492

Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export default {

export const Overview = {
render: () => {
const [text, setText] = useState("-");
const ref = useRef(null);
const [text, setText] = useState<string>("-");
const ref = useRef<HTMLButtonElement>(null);

const onFocusByMouse = useCallback(_event => {
const onFocusByMouse = useCallback((_event: React.FocusEvent<HTMLButtonElement>) => {
setText("mouse");
}, []);

const onFocusByKeyboard = useCallback(_event => {
const onFocusByKeyboard = useCallback((_event: React.FocusEvent<HTMLButtonElement>) => {
setText("keyboard");
}, []);

Expand Down
Loading