diff --git a/package-lock.json b/package-lock.json index d362e7e4..c221283a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -80,7 +80,7 @@ "vitest": "^1.0.1" }, "engines": { - "node": ">=18" + "node": ">=20" }, "peerDependencies": { "react": ">=17.0.1", diff --git a/src/components/navigation/navigation-disclosure-panel.tsx b/src/components/navigation/navigation-disclosure-panel.tsx index 1fb75293..e59fa2fc 100644 --- a/src/components/navigation/navigation-disclosure-panel.tsx +++ b/src/components/navigation/navigation-disclosure-panel.tsx @@ -2,8 +2,8 @@ import React from "react"; import { Disclosure } from "@headlessui/react"; import { classNames } from "../../util/class-names"; -export interface NavigationDisclosurePanelItemProps { - children: React.ReactNode; +export interface NavigationDisclosurePanelItemProps + extends React.ComponentPropsWithoutRef<"button"> { isActive?: boolean; isIndented?: boolean; } @@ -12,20 +12,23 @@ const NavigationDisclosurePanelItem = ({ children, isActive, isIndented, + ...props }: NavigationDisclosurePanelItemProps) => { return ( -
{children} {isActive && (
)} -
+ ); };