Skip to content

Commit

Permalink
Merge branch 'main' into hajimism/main
Browse files Browse the repository at this point in the history
  • Loading branch information
pacocoursey committed Aug 18, 2023
2 parents 5723a18 + f0668bd commit 0c3ad4f
Show file tree
Hide file tree
Showing 22 changed files with 2,633 additions and 4,809 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@ name: E2E - Test
on: push

jobs:
setup:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/[email protected]
id: waitForVercelPreviewDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 600
test:
needs: setup
name: Run Playwright tests
timeout-minutes: 5
runs-on: ubuntu-latest
Expand All @@ -24,10 +12,8 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
node-version: "18"
- run: yarn
- run: npx playwright install --with-deps
- name: Run tests
run: yarn test:e2e
env:
BASE_URL: ${{ needs.setup.outputs.preview_url }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 18.x

- name: yarn install
run: yarn
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ dist/
.next/
.yalc/
yalc.lock
.idea/
.turbo
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"printWidth": 100
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ That's it, your Next.js app fully supports dark mode, including System preferenc
}
```

> **Note!** If you set the attribute of your Theme Provider to class for Tailwind next-themes will modify the `class` attribute on the `html` element. See [With Tailwind](###with-tailwind).
### useTheme

Your UI will need to know the current theme and be able to change it. The `useTheme` hook provides theme information:
Expand Down
9 changes: 7 additions & 2 deletions examples/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^12.1.6",
"next-themes": "beta",
"next-themes": "*",
"react": "^18.1.0",
"react-dom": "^18.1.0"
}
}
}
164 changes: 0 additions & 164 deletions examples/example/yarn.lock

This file was deleted.

4 changes: 2 additions & 2 deletions examples/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"next": "^12.1.6",
"next-themes": "latest",
"next-themes": "*",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
Expand All @@ -18,4 +18,4 @@
"tailwindcss": "^2.0.1"
},
"license": "MIT"
}
}
2 changes: 1 addition & 1 deletion examples/tailwind/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../styles.css'

function MyApp({ Component, pageProps }) {
return (
<ThemeProvider forcedTheme={Component.theme || undefined} attribute="class">
<ThemeProvider forcedTheme={Component.theme || undefined} attribute='class'>
<Component {...pageProps} />
</ThemeProvider>
)
Expand Down
Loading

0 comments on commit 0c3ad4f

Please sign in to comment.