Skip to content

Commit

Permalink
fix builds, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pacocoursey committed Mar 13, 2024
1 parent 7db4f3d commit 18208d0
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 278 deletions.
2 changes: 1 addition & 1 deletion examples/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "next start"
},
"dependencies": {
"next": "12.2.2",
"next": "^13.4.19",
"next-themes": "workspace:*",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "next start"
},
"dependencies": {
"next": "12.2.2",
"next": "^13.4.19",
"next-themes": "workspace:*",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
22 changes: 9 additions & 13 deletions examples/with-app-dir/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"name": "with-app-dir",
"version": "0.1.0",
"private": true,
"version": "1.0.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"start": "next start"
},
"dependencies": {
"@types/node": "20.5.7",
"@types/react": "^18.2.21",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"next": "^13.4.19",
"next-themes": "workspace:*",
"postcss": "8.4.28",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3",
"typescript": "^5.2.2"
"react-dom": "18.2.0"
},
"devDependencies": {
"autoprefixer": "10.4.15",
"postcss": "8.4.28",
"tailwindcss": "3.3.3"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-app-dir/src/components/ThemeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import { useTheme } from 'next-themes'

function ThemeToggle() {
const { theme, setTheme } = useTheme()
const { theme, resolvedTheme, setTheme } = useTheme()

return (
<button
className="mt-16 px-4 py-2 text-white dark:text-black bg-black dark:bg-white font-semibold rounded-md"
onClick={() => {
setTheme(theme === 'light' ? 'dark' : 'light')
setTheme(resolvedTheme === 'light' ? 'dark' : 'light')
}}
>
Change Theme
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"devDependencies": {
"@playwright/test": "^1.37.1",
"@testing-library/react": "^11.2.5",
"@types/node": "20.5.7",
"@types/react": "^18.2.65",
"@types/react-dom": "18.2.7",
"jsdom": "^24.0.0",
"prettier": "^2.2.1",
"tsup": "^8.0.2",
Expand Down
Loading

0 comments on commit 18208d0

Please sign in to comment.