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

Add reactToKeys prop to Toc component and on_keydown handler to enable navigating ToC with keyboard #55

Merged
merged 4 commits into from
Mar 21, 2024

Commits on Mar 21, 2024

  1. update deps and pre-commit

    janosh committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    fed875b View commit details
    Browse the repository at this point in the history
  2. Add reactToKeys prop to Toc component and on_keydown handler to enabl…

    …e navigating ToC with keyboard
    janosh committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    a512fbd View commit details
    Browse the repository at this point in the history
  3. readme document prop reactToKeys: reactToKeys: string[] = [`ArrowDown…

    …`, `ArrowUp`, ` `, `Enter`, `Escape`, `Tab`]
    janosh committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    de8c430 View commit details
    Browse the repository at this point in the history
  4. new tests for ToC keyboard navigation

    arrow keys navigate the active ToC on mobile item when open=%s
    
    Escape key closes ToC on mobile if reactToKeys=%s includes 'Escape'
    janosh committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    7cb349e View commit details
    Browse the repository at this point in the history