Skip to content

docs: update theming example to next 15 #6209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"dependencies": {
"@primer/react": "37.26.0",
"next": "^15.2.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"styled-components": "5.x",
"typescript": "^5.8.2"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/theming/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
10 changes: 5 additions & 5 deletions examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
},
"dependencies": {
"@primer/octicons-react": "^19.14.0",
"@primer/react": "37.26.0",
"@primer/react": "^37.26.0",
Copy link
Preview

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider whether the example should pin @primer/react to an exact version or keep the caret range to maintain consistency with other example workspaces.

Suggested change
"@primer/react": "^37.26.0",
"@primer/react": "37.26.0",

Copilot uses AI. Check for mistakes.

"clsx": "^2.1.1",
"next": "^14.2.30",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"next": "^15.3.3",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"styled-components": "5.x",
"typescript": "^5.8.2"
},
"devDependencies": {
"@next/eslint-plugin-next": "14.1.0",
"@next/eslint-plugin-next": "15.3.3",
"rimraf": "^5.0.5"
}
}
4 changes: 2 additions & 2 deletions examples/theming/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const metadata = {
description: 'Generated by Next.js',
}

export default function RootLayout({children}: {children: React.ReactNode}) {
const cookieStore = cookies()
export default async function RootLayout({children}: {children: React.ReactNode}) {
const cookieStore = await cookies()
const colorPreferenceCookie = cookieStore.get('color-preference')
const colorMode = getColorMode(colorPreferenceCookie?.value)

Expand Down
3 changes: 2 additions & 1 deletion examples/theming/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
{
"name": "next"
}
]
],
"target": "ES2017"
},
"include": [
"next-env.d.ts",
Expand Down
Loading
Loading