Skip to content

Commit

Permalink
Merge pull request #58 from penumbra-zone/feat/v2-routes
Browse files Browse the repository at this point in the history
feat: #46: setup v2 routes and Tailwind
  • Loading branch information
VanishMax authored Sep 20, 2024
2 parents 9898273 + ee68517 commit ab9d013
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 43 deletions.
3 changes: 2 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/react-outside-click-handler": "^1.3.3",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.1.3",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"eslint-plugin-react": "^7.35.2",
"globals": "^15.9.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"ts-loader": "^9.5.1",
"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0"
Expand Down
117 changes: 77 additions & 40 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
14 changes: 14 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ReactNode } from 'react';
import '@/v2.css';

const RootLayout = ({ children }: { children: ReactNode }) => {
return (
<html lang="en">
<body>
{children}
</body>
</html>
)
}

export default RootLayout;
14 changes: 14 additions & 0 deletions src/app/v2/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use client';

import { ReactNode } from 'react';
import { PenumbraUIProvider } from '@penumbra-zone/ui/PenumbraUIProvider';

const V2Layout = ({ children }: { children: ReactNode }) => {
return (
<PenumbraUIProvider>
{children}
</PenumbraUIProvider>
)
};

export default V2Layout;
17 changes: 17 additions & 0 deletions src/app/v2/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';

const HomePage = () => {
return (
<section>
<h1 className="text-3xl font-bold text-white">
Hello world!
</h1>

<Text h2>Hi!</Text>
</section>
)
}

export default HomePage;
19 changes: 19 additions & 0 deletions styles/v2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body {
padding: 0;
margin: 0;
background: #000;
}

a {
color: inherit;
text-decoration: none;
}

* {
box-sizing: border-box;
}
10 changes: 10 additions & 0 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { tailwindConfig as v2TailwindConfig } from '@penumbra-zone/ui/tailwind';

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx,mdx,css}",
],
theme: v2TailwindConfig.theme,
plugins: [],
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"allowJs": true,
"incremental": true,
"jsx": "preserve"
"jsx": "preserve",
"strictNullChecks": true
},
"extends": [
"@tsconfig/strictest/tsconfig.json",
Expand All @@ -40,4 +41,4 @@
"exclude": [
"node_modules"
]
}
}

0 comments on commit ab9d013

Please sign in to comment.