Skip to content

Instantly share code, notes, and snippets.

@asgvard
Created March 17, 2022 14:40
Show Gist options
  • Save asgvard/de82940bf865adaf29b63ffb3c74e3d0 to your computer and use it in GitHub Desktop.
Save asgvard/de82940bf865adaf29b63ffb3c74e3d0 to your computer and use it in GitHub Desktop.
function Button() {
const { ref, focused } = useFocusable();
return (<div ref={ref} className={focused ? 'button-focused' : 'button'}>
Press me
</div>);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment