1
1
"use client" ;
2
2
3
3
import { Navbar , NavbarBrand , NavbarCollapse , NavbarLink , NavbarToggle } from "flowbite-react" ;
4
- import Link from "next/link" ;
5
4
import { CiMenuFries } from "react-icons/ci" ;
6
5
import { type CodeData } from "~/components/code-demo" ;
7
6
8
7
const code = `
9
8
"use client";
10
9
11
- import Link from "next/link";
12
10
import { Navbar } from "flowbite-react";
13
11
14
12
export function Component() {
15
13
return (
16
14
<Navbar fluid rounded>
17
- <Navbar.Brand as={Link} href="https://flowbite-react.com">
15
+ <Navbar.Brand href="https://flowbite-react.com">
18
16
<img src="/favicon.svg" className="mr-3 h-6 sm:h-9" alt="Flowbite React Logo" />
19
17
<span className="self-center whitespace-nowrap text-xl font-semibold dark:text-white">Flowbite React</span>
20
18
</Navbar.Brand>
@@ -23,7 +21,7 @@ export function Component() {
23
21
<Navbar.Link href="#" active>
24
22
Home
25
23
</Navbar.Link>
26
- <Navbar.Link as={Link} href="#">
24
+ <Navbar.Link href="#">
27
25
About
28
26
</Navbar.Link>
29
27
<Navbar.Link href="#">Services</Navbar.Link>
@@ -36,13 +34,12 @@ export function Component() {
36
34
` ;
37
35
38
36
const codeRSC = `
39
- import Link from "next/link";
40
37
import { Navbar, NavbarBrand, NavbarCollapse, NavbarLink, NavbarToggle } from "flowbite-react";
41
38
42
39
export function Component() {
43
40
return (
44
41
<Navbar fluid rounded>
45
- <NavbarBrand as={Link} href="https://flowbite-react.com">
42
+ <NavbarBrand href="https://flowbite-react.com">
46
43
<img src="/favicon.svg" className="mr-3 h-6 sm:h-9" alt="Flowbite React Logo" />
47
44
<span className="self-center whitespace-nowrap text-xl font-semibold dark:text-white">Flowbite React</span>
48
45
</NavbarBrand>
@@ -51,7 +48,7 @@ export function Component() {
51
48
<NavbarLink href="#" active>
52
49
Home
53
50
</NavbarLink>
54
- <NavbarLink as={Link} href="#">
51
+ <NavbarLink href="#">
55
52
About
56
53
</NavbarLink>
57
54
<NavbarLink href="#">Services</NavbarLink>
@@ -66,7 +63,7 @@ export function Component() {
66
63
export function Component ( ) {
67
64
return (
68
65
< Navbar fluid rounded >
69
- < NavbarBrand as = { Link } href = "https://flowbite-react.com" >
66
+ < NavbarBrand href = "https://flowbite-react.com" >
70
67
< img src = "/favicon.svg" className = "mr-3 h-6 sm:h-9" alt = "Flowbite React Logo" />
71
68
< span className = "self-center whitespace-nowrap text-xl font-semibold dark:text-white" > Flowbite React</ span >
72
69
</ NavbarBrand >
@@ -75,9 +72,7 @@ export function Component() {
75
72
< NavbarLink href = "#" active >
76
73
Home
77
74
</ NavbarLink >
78
- < NavbarLink as = { Link } href = "#" >
79
- About
80
- </ NavbarLink >
75
+ < NavbarLink href = "#" > About</ NavbarLink >
81
76
< NavbarLink href = "#" > Services</ NavbarLink >
82
77
< NavbarLink href = "#" > Pricing</ NavbarLink >
83
78
< NavbarLink href = "#" > Contact</ NavbarLink >
0 commit comments