Skip to content

Instantly share code, notes, and snippets.

@beans42
Last active January 9, 2022 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beans42/dfc9c1a04edefdded8b4d98c9dd65962 to your computer and use it in GitHub Desktop.
Save beans42/dfc9c1a04edefdded8b4d98c9dd65962 to your computer and use it in GitHub Desktop.
Minimal working example
const withPreact = require('next-plugin-preact');
module.exports = withPreact({});
{
"scripts": {
"dev": "cross-env NODE_ENV=development next",
"build:ssg": "cross-env NODE_ENV=production next build && next export -o docs",
"build:ssr": "cross-env NODE_ENV=production next build",
"start": "cross-env NODE_ENV=production next start"
},
"devDependencies": {
"cross-env": "^7.0.3"
},
"dependencies": {
"@geist-ui/react": "^2.2.0",
"next": "^12.0.7",
"next-plugin-preact": "^3.0.6",
"preact": "10.6.4",
"preact-render-to-string": "^5.1.19",
"react": "npm:@preact/compat@^17.0.3",
"react-dom": "npm:@preact/compat@^17.0.3",
"react-ssr-prepass": "npm:preact-ssr-prepass@^1.2.0",
"scheduler": "^0.20.2"
}
}
import { GeistProvider, CssBaseline } from '@geist-ui/react';
export default ({ Component, pageProps }) => {
return (
<GeistProvider>
<CssBaseline />
<Component {...pageProps} />
</GeistProvider>
);
};
import { Tabs } from '@geist-ui/react';
export default () => {
return (
<Tabs initialValue='1'>
<Tabs.Item label='First' value='1'>
First tab contents.
</Tabs.Item>
<Tabs.Item label='Second' value='2'>
Second tab contents.
</Tabs.Item>
</Tabs>
)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment