Skip to content

Commit

Permalink
Update docs to use Next.js 13 (#986)
Browse files Browse the repository at this point in the history
* update docs to use next 13

* add changeset
  • Loading branch information
shuding committed Nov 30, 2022
1 parent 530b6fe commit fdb2f57
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 126 deletions.
7 changes: 7 additions & 0 deletions .changeset/clever-bulldogs-nail.md
@@ -0,0 +1,7 @@
---
'nextra': patch
'nextra-theme-blog': patch
'nextra-theme-docs': patch
---

update docs to use next.js 13
62 changes: 30 additions & 32 deletions docs/components/card/index.tsx
Expand Up @@ -17,42 +17,16 @@ export function Card({ children, title, icon, image, arrow, href, ...props }) {

if (image) {
return (
<Link href={href} passHref>
<a
className={cn(
styles.card,
'group flex flex-col justify-start overflow-hidden rounded-lg border border-transparent bg-gray-100 text-current no-underline shadow shadow-gray-200 transition-all duration-200',
'hover:border-gray-200 hover:shadow-lg hover:shadow-gray-200'
)}
{...props}
>
{children}
<span
className={cn(
styles.title,
'gap-1 p-4 text-gray-700',
'hover:text-gray-900'
)}
>
{icon}
{title}
{animatedArrow}
</span>
</a>
</Link>
)
}

return (
<Link href={href} passHref>
<a
<Link
href={href}
className={cn(
styles.card,
'group flex flex-col justify-start overflow-hidden rounded-lg border border-transparent bg-gray-100 text-current no-underline shadow shadow-transparent transition-all duration-200',
'hover:border-gray-200 hover:shadow-md hover:shadow-gray-100'
'group flex flex-col justify-start overflow-hidden rounded-lg border border-transparent bg-gray-100 text-current no-underline shadow shadow-gray-200 transition-all duration-200',
'hover:border-gray-200 hover:shadow-lg hover:shadow-gray-200'
)}
{...props}
>
{children}
<span
className={cn(
styles.title,
Expand All @@ -64,7 +38,31 @@ export function Card({ children, title, icon, image, arrow, href, ...props }) {
{title}
{animatedArrow}
</span>
</a>
</Link>
)
}

return (
<Link
href={href}
className={cn(
styles.card,
'group flex flex-col justify-start overflow-hidden rounded-lg border border-transparent bg-gray-100 text-current no-underline shadow shadow-transparent transition-all duration-200',
'hover:border-gray-200 hover:shadow-md hover:shadow-gray-100'
)}
{...props}
>
<span
className={cn(
styles.title,
'gap-1 p-4 text-gray-700',
'hover:text-gray-900'
)}
>
{icon}
{title}
{animatedArrow}
</span>
</Link>
)
}
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Expand Up @@ -11,9 +11,9 @@
"dependencies": {
"clsx": "^1.2.1",
"framer-motion": "^7.3.2",
"next": "^12.3.4",
"nextra": "^2.0.0-beta.42",
"nextra-theme-docs": "^2.0.0-beta.42",
"next": "^13.0.5",
"nextra": "2.0.0-beta.43",
"nextra-theme-docs": "2.0.0-beta.43",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down

0 comments on commit fdb2f57

Please sign in to comment.