Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

improve nav menu

Steven Teyb66f41f425ba
diff --git a/packages/ui/package.json b/packages/ui/package.json
index bd1dca782c..3d0174aad4 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,7 +1,7 @@
{
"name": "@dub/ui",
"description": "UI components for Dub.co",
- "version": "0.1.29",
+ "version": "0.1.30",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
diff --git a/packages/ui/src/nav/content/resources-content.tsx b/packages/ui/src/nav/content/resources-content.tsx
index 55563c0b40..5091012d99 100644
--- a/packages/ui/src/nav/content/resources-content.tsx
+++ b/packages/ui/src/nav/content/resources-content.tsx
@@ -162,6 +162,7 @@ export function ResourcesContent({ domain }: ContentProps) {
/>
}
title={title}
+ showArrow
/>
))}
</div>
diff --git a/packages/ui/src/nav/content/shared.tsx b/packages/ui/src/nav/content/shared.tsx
index c386481c8f..9319128797 100644
--- a/packages/ui/src/nav/content/shared.tsx
+++ b/packages/ui/src/nav/content/shared.tsx
@@ -1,6 +1,7 @@
import { cn } from "@dub/utils";
import Link from "next/link";
import { ComponentProps, ReactNode, SVGProps } from "react";
+import { ExpandingArrow } from "../../icons";
export const contentHeadingClassName =
"text-xs uppercase text-gray-500 dark:text-white/60";
@@ -14,18 +15,20 @@ export function ContentLinkCard({
description,
descriptionLines = 1,
className,
+ showArrow,
...rest
}: {
icon: ReactNode;
title: string;
description?: string;
descriptionLines?: 1 | 2;
+ showArrow?: boolean;
} & ComponentProps<typeof Link>) {
return (
<Link className={cn(contentLinkCardClassName, className)} {...rest}>
- <div className="flex items-center gap-3">
+ <div className="flex items-center justify-between gap-3">
{icon}
- <div>
+ <div className="flex-1">
<p className="text-sm font-medium text-gray-700 dark:text-white">
{title}
</p>
@@ -40,6 +43,9 @@ export function ContentLinkCard({
</p>
)}
</div>
+ {showArrow && (
+ <ExpandingArrow className="invisible -ml-6 h-4 w-4 text-gray-700 group-aria-selected:visible sm:group-hover:visible" />
+ )}
</div>
</Link>
);
diff --git a/packages/ui/src/nav/content/solutions-content.tsx b/packages/ui/src/nav/content/solutions-content.tsx
index 5c12874fd4..1187f33b5b 100644
--- a/packages/ui/src/nav/content/solutions-content.tsx
+++ b/packages/ui/src/nav/content/solutions-content.tsx
@@ -39,6 +39,7 @@ export function SolutionsContent({ domain }: ContentProps) {
/>
}
title={title}
+ showArrow
/>
))}
</div>
diff --git a/packages/ui/src/nav/nav.tsx b/packages/ui/src/nav/nav.tsx
index 1718776de9..bedd46284e 100644
--- a/packages/ui/src/nav/nav.tsx
+++ b/packages/ui/src/nav/nav.tsx
@@ -26,7 +26,6 @@ export const NavContext = createContext<{ theme: NavTheme }>({
export const navItems = [
{
name: "Product",
- href: "/",
content: ProductContent,
childItems: FEATURES_LIST,
},