-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated with-styletron example to utilize the app router.
- Loading branch information
1 parent
564794d
commit 2c2a209
Showing
5 changed files
with
58 additions
and
58 deletions.
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8
examples/with-styletron/pages/_app.js → examples/with-styletron/app/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
"use client"; | ||
import { Provider as StyletronProvider } from "styletron-react"; | ||
import { styletron } from "../styletron"; | ||
|
||
export default function App({ Component, pageProps }) { | ||
export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<StyletronProvider value={styletron}> | ||
<Component {...pageProps} /> | ||
<html lang="en"> | ||
<head /> | ||
<body>{children}</body> | ||
</html> | ||
</StyletronProvider> | ||
); | ||
} |
11 changes: 7 additions & 4 deletions
11
examples/with-styletron/pages/index.js → examples/with-styletron/app/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2017", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"noEmit": true, | ||
"incremental": true, | ||
"module": "esnext", | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
] | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
".next/types/**/*.ts", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |