Skip to content

Commit

Permalink
fix(components): use div instead of button to fix invalid html
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlfischer committed Dec 13, 2023
1 parent 605f4ef commit a6f62cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/navigation/navigation-disclosure-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from "react";
import { Disclosure } from "@headlessui/react";
import { classNames } from "../../util/class-names";

export interface NavigationDisclosurePanelItemProps
extends React.ComponentPropsWithoutRef<"button"> {
export interface NavigationDisclosurePanelItemProps extends React.ComponentPropsWithoutRef<"div"> {
isActive?: boolean;
isIndented?: boolean;
}
Expand All @@ -15,8 +14,7 @@ const NavigationDisclosurePanelItem = ({
...props
}: NavigationDisclosurePanelItemProps) => {
return (
<button
type="button"
<div
className={classNames(
"relative w-full px-8 py-3 text-left text-sm text-neutral-0 hover:bg-primary-900+10",
isIndented && "px-14",
Expand All @@ -28,7 +26,7 @@ const NavigationDisclosurePanelItem = ({
{isActive && (
<div className="absolute bottom-0 left-0 top-0 h-full w-0.5 rounded-r-sm bg-neutral-0" />
)}
</button>
</div>
);
};

Expand Down

0 comments on commit a6f62cf

Please sign in to comment.