Skip to content

Commit

Permalink
fix(system): align navigate function parameters with @react-aria
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Nov 28, 2024
1 parent 17bf657 commit 49c106a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-laws-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/system": patch
---

align `navigate` function parameters with `@react-aria`
4 changes: 2 additions & 2 deletions packages/core/system/src/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {ModalProviderProps} from "@react-aria/overlays";
import type {ProviderContextProps} from "./provider-context";
import type {Href} from "@react-types/shared";
import type {Href, RouterOptions} from "@react-types/shared";

import {I18nProvider, I18nProviderProps} from "@react-aria/i18n";
import {RouterProvider} from "@react-aria/utils";
Expand Down Expand Up @@ -37,7 +37,7 @@ export interface NextUIProviderProps
* Provides a client side router to all nested components such as
* Link, Menu, Tabs, Table, etc.
*/
navigate?: (path: string) => void;
navigate?: (path: Href, routerOptions: RouterOptions | undefined) => void;
/**
* Convert an `href` provided to a link component to a native `href`
* For example, a router might accept hrefs relative to a base path,
Expand Down

0 comments on commit 49c106a

Please sign in to comment.