Skip to content

Instantly share code, notes, and snippets.

@theKashey
Created May 7, 2018 04:17
Show Gist options
  • Save theKashey/df6844af7a75ca72d794a7ab4e7618d5 to your computer and use it in GitHub Desktop.
Save theKashey/df6844af7a75ca72d794a7ab4e7618d5 to your computer and use it in GitHub Desktop.
Locky example
import Locky from 'react-locky';
import FocusLock from 'react-focus-lock';
const LockedModal = () => (
<Modal>
<Locky>
// it is important to manage focus, to not let "tab-out", as long you will be unable to "tab-in"
<FocusLock>
Hey! You can only click on this button!
<button> click me </button>
</FocusLock>
</Locky>
</Modal>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment