Skip to content

Commit

Permalink
chore(next-example): improve link component (#1954)
Browse files Browse the repository at this point in the history
Signed-off-by: Jie Peng <im@jiepeng.me>

Signed-off-by: Jie Peng <im@jiepeng.me>
  • Loading branch information
neighborhood999 committed Dec 4, 2022
1 parent 77c4a66 commit cdb4d40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
8 changes: 4 additions & 4 deletions examples/next/components/navbar.tsx
Expand Up @@ -5,11 +5,11 @@ function Navbar() {
<nav className="px-10 bg-teal-700">
<div className="relative flex items-center justify-between h-16">
<div className="flex space-x-4">
<Link href="/" >
<a className="bg-teal-900 text-white px-3 py-2 rounded-md text-sm font-medium">Home</a>
<Link href="/" className="bg-teal-900 text-white px-3 py-2 rounded-md text-sm font-medium">
Home
</Link>
<Link href="/blog" >
<a className="text-teal-100 hover:bg-teal-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Blog</a>
<Link href="/blog" className="text-teal-100 hover:bg-teal-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium">
Blog
</Link>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions examples/next/pages/blog/index.tsx
Expand Up @@ -9,11 +9,9 @@ const Blog: NextPage = () => {
<main className="py-20 px-12 text-center flex flex-col items-center gap-20px">
<h2 className="text-3xl font-bold text-green-900">Blog posts</h2>

<Link href="/">
<a className="flex items-center btn">
<div className="i-carbon-arrow-left" />
<Link href="/" className="flex items-center btn">
<div className="i-carbon-arrow-left" />
Home
</a>
</Link>
</main>
</>
Expand Down
6 changes: 2 additions & 4 deletions examples/next/pages/index.tsx
Expand Up @@ -17,11 +17,9 @@ const Home: NextPage = () => {
<span text="blue 5xl hover:red" cursor="default">Hello Next</span>
<div className="i-carbon-car inline-block" text="4xl teal-500" />

<Link href="/blog">
<a className="flex items-center btn">
Blog
<Link href="/blog" className="flex items-center btn">
Blog
<div className="i-carbon-arrow-right" />
</a>
</Link>
</main>
</>
Expand Down

0 comments on commit cdb4d40

Please sign in to comment.