This commit is contained in:
2026-10-01 08:02:47 +01:00
parent 6392457ffb
commit 3dc9f12ad4
104 changed files with 6536 additions and 1037 deletions
+9 -9
View File
@@ -1,9 +1,9 @@
import React, {
AnchorHTMLAttributes,
ComponentProps,
DetailedHTMLProps,
type AnchorHTMLAttributes,
type ComponentProps,
type DetailedHTMLProps,
} from "react";
import { DocsLinkType } from ".";
import type { DocsLinkType } from ".";
import Stack from "../../layout/Stack";
import { twMerge } from "tailwind-merge";
import Row from "../../layout/Row";
@@ -45,11 +45,11 @@ export default function TWUIDocsLink({
React.useEffect(() => {
if (typeof window !== "undefined") {
const basePathMatch = window.location.pathname.includes(
docLink.href
docLink.href,
);
const isStrictMatch = Boolean(
linkRef.current?.getAttribute("data-strict")
linkRef.current?.getAttribute("data-strict"),
);
if (strict || isStrictMatch) {
@@ -79,7 +79,7 @@ export default function TWUIDocsLink({
"twui-docs-left-aside-link whitespace-nowrap",
"grow overflow-hidden overflow-ellipsis",
isActive ? "active" : "",
props.className
props.className,
)}
ref={linkRef}
data-strict={strict || docLink.strict}
@@ -93,7 +93,7 @@ export default function TWUIDocsLink({
color="gray"
className={twMerge(
"p-1 hover:opacity-100",
expand ? "rotate-180 opacity-30" : "opacity-70"
expand ? "rotate-180 opacity-30" : "opacity-70",
)}
onClick={() => setExpand(!expand)}
title="Docs Aside Links Dropdown Button"
@@ -107,7 +107,7 @@ export default function TWUIDocsLink({
<Stack
className={twMerge(
"gap-2 w-full pl-3",
childWrapperProps?.className
childWrapperProps?.className,
)}
{...childWrapperProps}
>