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

Tiny fix: correct name of enableScope/disableScope in README and test description. #1056

Merged
merged 1 commit into from
Jul 21, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const ExampleComponent = () => {

#### Changing a scope's active state

You can change the active state of a scope using the `deactivateScope`, `activateScope` and `toggleScope` functions
You can change the active state of a scope using the `disableScope`, `enableScope` and `toggleScope` functions
returned by the `useHotkeysContext()` hook. Note that you have to have your app wrapped in a `<HotkeysProvider>` component.

```jsx harmony
Expand Down
4 changes: 2 additions & 2 deletions tests/HotkeysProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('should return active scopes and scope modifying functions', () => {
expect(result.current.toggleScope).toBeInstanceOf(Function)
})

test('should activate scope by calling activateScope', () => {
test('should activate scope by calling enableScope', () => {
const { result } = renderHook(() => useHotkeysContext(), {
wrapper: HotkeysProvider,
})
Expand Down Expand Up @@ -91,7 +91,7 @@ test('should return multiple scopes if different scopes are activated', () => {
expect(result.current.enabledScopes).toEqual(['foo', 'bar'])
})

test('should deactivate scope by calling deactivateScope', () => {
test('should deactivate scope by calling disableScope', () => {
const { result } = renderHook(() => useHotkeysContext(), {
wrapper: HotkeysProvider,
})
Expand Down