Skip to content

Commit

Permalink
Merge pull request #1021 from fineup/documentation
Browse files Browse the repository at this point in the history
doc: Fix HotkeysProvider in documentation
  • Loading branch information
JohannesKlauss authored May 5, 2023
2 parents 6775c8d + 12b0805 commit 1fc6d6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

1 comment on commit 1fc6d6a

@vercel
Copy link

@vercel vercel bot commented on 1fc6d6a May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.