feat: add base docs template
This commit is contained in:
parent
1239dbf4ef
commit
28f84778bf
12
packages/react/index.html
Normal file
12
packages/react/index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PSW/UI</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
@ -14,6 +14,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"tailwind-merge": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -29,6 +30,7 @@
|
||||
"@storybook/test": "^8.1.0",
|
||||
"@types/react": "^18.2.66",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||
"@typescript-eslint/parser": "^7.2.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
|
26
packages/react/src/App.tsx
Normal file
26
packages/react/src/App.tsx
Normal file
@ -0,0 +1,26 @@
|
||||
import {
|
||||
Route,
|
||||
createBrowserRouter,
|
||||
createRoutesFromElements,
|
||||
RouterProvider,
|
||||
} from "react-router-dom";
|
||||
import SideNav from "./SideNav";
|
||||
import Home from "./Home";
|
||||
|
||||
const router = createBrowserRouter(
|
||||
createRoutesFromElements(
|
||||
<Route path="/" element={<SideNav />}>
|
||||
<Route index element={<Home />} />
|
||||
</Route>
|
||||
)
|
||||
);
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<>
|
||||
<RouterProvider router={router} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
5
packages/react/src/Home.tsx
Normal file
5
packages/react/src/Home.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
function Home() {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default Home;
|
5
packages/react/src/SideNav.tsx
Normal file
5
packages/react/src/SideNav.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
function SideNav() {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default SideNav;
|
10
packages/react/src/main.tsx
Normal file
10
packages/react/src/main.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import "./tailwind.css";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
61
yarn.lock
61
yarn.lock
@ -2209,6 +2209,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@remix-run/router@npm:1.16.1":
|
||||
version: 1.16.1
|
||||
resolution: "@remix-run/router@npm:1.16.1"
|
||||
checksum: 10c0/5f1b0aef4924830eeab9c86dcaa5af8157066e5de65b449e7fdf406532b2384828a46a447c31b0735fd713a06938dd88bfd4e566d9989be70c770457dda16c92
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/pluginutils@npm:^5.0.2":
|
||||
version: 5.1.0
|
||||
resolution: "@rollup/pluginutils@npm:5.1.0"
|
||||
@ -3406,6 +3413,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/history@npm:^4.7.11":
|
||||
version: 4.7.11
|
||||
resolution: "@types/history@npm:4.7.11"
|
||||
checksum: 10c0/3facf37c2493d1f92b2e93a22cac7ea70b06351c2ab9aaceaa3c56aa6099fb63516f6c4ec1616deb5c56b4093c026a043ea2d3373e6c0644d55710364d02c934
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/http-errors@npm:*":
|
||||
version: 2.0.4
|
||||
resolution: "@types/http-errors@npm:2.0.4"
|
||||
@ -3510,6 +3524,27 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-router-dom@npm:^5.3.3":
|
||||
version: 5.3.3
|
||||
resolution: "@types/react-router-dom@npm:5.3.3"
|
||||
dependencies:
|
||||
"@types/history": "npm:^4.7.11"
|
||||
"@types/react": "npm:*"
|
||||
"@types/react-router": "npm:*"
|
||||
checksum: 10c0/a9231a16afb9ed5142678147eafec9d48582809295754fb60946e29fcd3757a4c7a3180fa94b45763e4c7f6e3f02379e2fcb8dd986db479dcab40eff5fc62a91
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-router@npm:*":
|
||||
version: 5.1.20
|
||||
resolution: "@types/react-router@npm:5.1.20"
|
||||
dependencies:
|
||||
"@types/history": "npm:^4.7.11"
|
||||
"@types/react": "npm:*"
|
||||
checksum: 10c0/1f7eee61981d2f807fa01a34a0ef98ebc0774023832b6611a69c7f28fdff01de5a38cabf399f32e376bf8099dcb7afaf724775bea9d38870224492bea4cb5737
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react@npm:*, @types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0, @types/react@npm:^18.2.66":
|
||||
version: 18.3.2
|
||||
resolution: "@types/react@npm:18.3.2"
|
||||
@ -8461,6 +8496,30 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-router-dom@npm:^6.23.1":
|
||||
version: 6.23.1
|
||||
resolution: "react-router-dom@npm:6.23.1"
|
||||
dependencies:
|
||||
"@remix-run/router": "npm:1.16.1"
|
||||
react-router: "npm:6.23.1"
|
||||
peerDependencies:
|
||||
react: ">=16.8"
|
||||
react-dom: ">=16.8"
|
||||
checksum: 10c0/01b954d7d0ff4c53bb2edbc816458f3fad1ce9ee49a4dfdc5c866065c23026c9cce429b46b754cbaebb83b22cfe5f605bbf441acf515e3c377cbdf021b0bec4c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-router@npm:6.23.1":
|
||||
version: 6.23.1
|
||||
resolution: "react-router@npm:6.23.1"
|
||||
dependencies:
|
||||
"@remix-run/router": "npm:1.16.1"
|
||||
peerDependencies:
|
||||
react: ">=16.8"
|
||||
checksum: 10c0/091949805745136350ab049b2a96281bf38742c9d3651019fb48ea79c5eafbfb0379f1d3e636602dd56b0ef278389e8fd25be983dc2c0ffd1103d06dfa8019f3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-style-singleton@npm:^2.2.1":
|
||||
version: 2.2.1
|
||||
resolution: "react-style-singleton@npm:2.2.1"
|
||||
@ -8503,6 +8562,7 @@ __metadata:
|
||||
"@storybook/test": "npm:^8.1.0"
|
||||
"@types/react": "npm:^18.2.66"
|
||||
"@types/react-dom": "npm:^18.2.22"
|
||||
"@types/react-router-dom": "npm:^5.3.3"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^7.2.0"
|
||||
"@typescript-eslint/parser": "npm:^7.2.0"
|
||||
"@vitejs/plugin-react": "npm:^4.2.1"
|
||||
@ -8514,6 +8574,7 @@ __metadata:
|
||||
postcss: "npm:^8.4.38"
|
||||
react: "npm:^18.2.0"
|
||||
react-dom: "npm:^18.2.0"
|
||||
react-router-dom: "npm:^6.23.1"
|
||||
storybook: "npm:^8.1.0"
|
||||
tailwind-merge: "npm:^2.3.0"
|
||||
tailwindcss: "npm:^3.4.3"
|
||||
|
Loading…
x
Reference in New Issue
Block a user