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

doc: Fix HotkeysProvider in documentation #1021

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions documentation/docs/documentation/hotkeys-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ If your app is highly dynamic and you want to know which scopes are currently ac

## Set initially active scopes

You can set the initially active scopes by passing an array of strings to the `initialScopes` prop of the `HotkeysProvider`.
You can set the initially active scopes by passing an array of strings to the `initiallyActiveScopes` prop of the `HotkeysProvider`.

```jsx
import { HotkeysProvider } from 'react-hotkeys-hook';

function App() {
return (
<HotkeysProvider initialScopes={['scopeA']}>
<HotkeysProvider initiallyActiveScopes={['scopeA']}>
<div>
<h1>My App</h1>
</div>
Expand All @@ -91,6 +91,6 @@ function App() {
}
```

:::info Wildcard scope when using `initialScopes`
If you set the `initialScopes` prop, the wildcard scope will not be active by default. You would have to set `['scopeA', '*']`.
:::info Wildcard scope when using `initiallyActiveScopes`
If you set the `initiallyActiveScopes` prop, the wildcard scope will not be active by default. You would have to set `['scopeA', '*']`.
:::
2 changes: 1 addition & 1 deletion documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl:
'https://github.com/JohannesKlauss/react-hotkeys-hook/edit/master/documentation/',
'https://github.com/JohannesKlauss/react-hotkeys-hook/edit/main/documentation/',
lastVersion: 'current',
versions: {
current: {
Expand Down