Skip to content

Commit 740af55

Browse files
committed
solidja initial setup
1 parent 24afd19 commit 740af55

File tree

15 files changed

+1619
-59
lines changed

15 files changed

+1619
-59
lines changed

package-lock.json

Lines changed: 1035 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"packages/composables/*",
8080
"packages/hooks/*",
8181
"packages/modal",
82+
"packages/modal-ui",
8283
"packages/no-modal",
8384
"packages/plugins/*",
8485
"packages/providers/*",

packages/modal-ui/.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2020": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"@toruslabs/eslint-config-react"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": 11,
13+
"project": "./tsconfig.json",
14+
"sourceType": "module"
15+
},
16+
"root": true,
17+
"rules": {
18+
"@typescript-eslint/no-throw-literal": 0,
19+
"import/extensions": [
20+
{
21+
"js": "never",
22+
"jsx": "never",
23+
"ts": "never",
24+
"tsx": "never"
25+
},
26+
"error",
27+
"ignorePackages"
28+
],
29+
"no-console": 2,
30+
"react/no-is-mounted": 0
31+
}
32+
}

packages/modal-ui/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

packages/modal-ui/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Usage
2+
3+
Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`.
4+
5+
This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template.
6+
7+
```bash
8+
$ npm install # or pnpm install or yarn install
9+
```
10+
11+
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
12+
13+
## Available Scripts
14+
15+
In the project directory, you can run:
16+
17+
### `npm run dev` or `npm start`
18+
19+
Runs the app in the development mode.<br>
20+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
21+
22+
The page will reload if you make edits.<br>
23+
24+
### `npm run build`
25+
26+
Builds the app for production to the `dist` folder.<br>
27+
It correctly bundles Solid in production mode and optimizes the build for the best performance.
28+
29+
The build is minified and the filenames include the hashes.<br>
30+
Your app is ready to be deployed!
31+
32+
## Deployment
33+
34+
You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)

packages/modal-ui/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="theme-color" content="#000000" />
7+
<title>Web3auth Modal UI</title>
8+
</head>
9+
<body>
10+
<noscript>You need to enable JavaScript to run this app.</noscript>
11+
<div id="root"></div>
12+
13+
<script src="/src/index.tsx" type="module"></script>
14+
</body>
15+
</html>

packages/modal-ui/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"bugs": {
3+
"url": "https://github.com/Web3Auth/Web3Auth/issues"
4+
},
5+
"dependencies": {
6+
"solid-js": "^1.8.11"
7+
},
8+
"description": "Ui modal for web3Auth",
9+
"devDependencies": {
10+
"@babel/preset-react": "^7.25.9",
11+
"@mertasan/tailwindcss-variables": "^2.7.0",
12+
"autoprefixer": "^10.4.17",
13+
"postcss": "^8.4.33",
14+
"solid-devtools": "^0.29.2",
15+
"tailwindcss": "^3.4.1",
16+
"typescript": "^5.3.3",
17+
"vite": "^5.0.11",
18+
"vite-plugin-solid": "^2.8.2"
19+
},
20+
"engines": {
21+
"node": ">=18.x",
22+
"npm": ">=9.x"
23+
},
24+
"keywords": [
25+
"blockchain",
26+
"ethereum",
27+
"multichainWallet",
28+
"solana",
29+
"web3Auth",
30+
"web3Auth/ui"
31+
],
32+
"license": "MIT",
33+
"name": "@web3auth/modal-ui",
34+
"publishConfig": {
35+
"access": "public"
36+
},
37+
"repository": {
38+
"type": "git",
39+
"url": "git+https://github.com/Web3Auth/Web3Auth.git"
40+
},
41+
"scripts": {
42+
"build": "vite build",
43+
"dev": "vite",
44+
"serve": "vite preview",
45+
"start": "vite"
46+
},
47+
"version": "0.0.0"
48+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
3+
plugins: {
4+
tailwindcss: {},
5+
autoprefixer: {},
6+
},
7+
};

packages/modal-ui/src/App.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { batch, type Component, createSignal } from "solid-js";
2+
3+
const App: Component = () => {
4+
const [counter, setCounter] = createSignal(0);
5+
6+
const incrementCounter = () => {
7+
batch(() => {
8+
setCounter((c) => c + 1);
9+
});
10+
};
11+
return (
12+
<>
13+
<p class="text-4xl text-app-white text-center py-20 bg-app-primary-600">Hello tailwind! hello</p>
14+
<br />
15+
<button onClick={incrementCounter}>Click to increment - {counter()}</button>
16+
</>
17+
);
18+
};
19+
20+
export default App;

packages/modal-ui/src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

0 commit comments

Comments
 (0)