diff --git a/.changeset/tiny-laws-cheer.md b/.changeset/tiny-laws-cheer.md new file mode 100644 index 0000000000..9c8bae4547 --- /dev/null +++ b/.changeset/tiny-laws-cheer.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/system": patch +--- + +align `navigate` function parameters with `@react-aria` diff --git a/packages/core/system/src/provider.tsx b/packages/core/system/src/provider.tsx index d30c8316c3..2f5ca5afd1 100644 --- a/packages/core/system/src/provider.tsx +++ b/packages/core/system/src/provider.tsx @@ -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"; @@ -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,