Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert with-goober example to TS (#39761)
## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc] Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
- Loading branch information
1 parent
74fb7ba
commit bc4d98a
Showing
5 changed files
with
49 additions
and
12 deletions.
There are no files selected for viewing
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
9 changes: 5 additions & 4 deletions
9
examples/with-goober/pages/_app.js → examples/with-goober/pages/_app.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,12 +1,13 @@ | ||
import React from 'react' | ||
import { prefix } from 'goober-autoprefixer' | ||
import { createElement } from 'react' | ||
import { setup } from 'goober' | ||
import { prefix } from 'goober/prefixer' | ||
import type { AppProps } from 'next/app' | ||
|
||
// goober's needs to know how to render the `styled` nodes. | ||
// So to let it know, we run the `setup` function with the | ||
// `createElement` function and prefixer function. | ||
setup(React.createElement, prefix) | ||
setup(createElement, prefix) | ||
|
||
export default function App({ Component, pageProps }) { | ||
export default function App({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
} |
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
File renamed without changes.
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,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |