docs: fix next/link import syntax in component examples (#8427)

Fix incorrect named import syntax for Next.js Link component.

Changed from:
  import { Link } from "next/link"

To correct default import:
  import Link from "next/link"

Next.js Link is a default export, not a named export. The incorrect
syntax causes TypeScript error:
'Module "next/link" has no exported member "Link"'

Affected files:
- Button component docs
- Badge component docs
- Breadcrumb component docs (v4 and www)
- Navigation Menu component docs

Fixes issue where users copying code snippets get immediate errors.

Co-authored-by: serhatx1 <armonikadijital@gmail.com>
This commit is contained in:
Serhat Arslan
2025-10-14 21:38:58 +03:00
committed by GitHub
parent 40c3ff513a
commit bea7d30536
5 changed files with 5 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ import { Badge } from "@/components/ui/badge"
You can use the `asChild` prop to make another component look like a badge. Here's an example of a link that looks like a badge.
```tsx showLineNumbers
import { Link } from "next/link"
import Link from "next/link"
import { Badge } from "@/components/ui/badge"

View File

@@ -180,7 +180,7 @@ To use a custom link component from your routing library, you can use the `asChi
/>
```tsx showLineNumbers {1,8-10}
import { Link } from "next/link"
import Link from "next/link"
...

View File

@@ -278,7 +278,7 @@ To create a button group, use the `ButtonGroup` component. See the [Button Group
You can use the `asChild` prop to make another component look like a button. Here's an example of a link that looks like a button.
```tsx showLineNumbers
import { Link } from "next/link"
import Link from "next/link"
import { Button } from "@/components/ui/button"

View File

@@ -83,7 +83,7 @@ import {
You can use the `asChild` prop to make another component look like a navigation menu trigger. Here's an example of a link that looks like a navigation menu trigger.
```tsx showLineNumbers title="components/example-navigation-menu.tsx"
import { Link } from "next/link"
import Link from "next/link"
export function NavigationMenuDemo() {
return (

View File

@@ -181,7 +181,7 @@ To use a custom link component from your routing library, you can use the `asChi
/>
```tsx showLineNumbers {1,8-10}
import { Link } from "next/link"
import Link from "next/link"
...