Skip to content

Commit 581fd50

Browse files
committed
feat: initialize project
0 parents  commit 581fd50

32 files changed

+519
-0
lines changed

.eslintrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
env: { browser: true, es2020: true },
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:react-hooks/recommended',
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
10+
plugins: ['react-refresh'],
11+
rules: {
12+
'react-refresh/only-export-components': 'warn',
13+
},
14+
}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
package-lock.json
10+
yarn.lock
11+
*.lock
12+
13+
node_modules
14+
dist
15+
dist-ssr
16+
*.local
17+
18+
# Editor directories and files
19+
.vscode/*
20+
!.vscode/extensions.json
21+
.idea
22+
.DS_Store
23+
*.suo
24+
*.ntvs*
25+
*.njsproj
26+
*.sln
27+
*.sw?

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Inscribe Files or Text with bitmap community
2+
3+

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Bitmap Community</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "inscribe-ui",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"react": "^18.2.0",
14+
"react-dom": "^18.2.0",
15+
"react-dropzone": "^14.2.3",
16+
"tailwind-merge": "^1.13.2",
17+
"tailwindcss-animate": "^1.0.6",
18+
"wouter": "^2.11.0"
19+
},
20+
"devDependencies": {
21+
"@tailwindcss/forms": "^0.5.4",
22+
"@types/node": "^20.4.2",
23+
"@types/react": "^18.0.37",
24+
"@types/react-dom": "^18.0.11",
25+
"@typescript-eslint/eslint-plugin": "^5.59.0",
26+
"@typescript-eslint/parser": "^5.59.0",
27+
"@vitejs/plugin-react-swc": "^3.0.0",
28+
"autoprefixer": "^10.4.14",
29+
"eslint": "^8.38.0",
30+
"eslint-plugin-react-hooks": "^4.6.0",
31+
"eslint-plugin-react-refresh": "^0.3.4",
32+
"postcss": "^8.4.24",
33+
"tailwindcss": "^3.3.2",
34+
"typescript": "^5.0.2",
35+
"vite": "^4.3.9"
36+
}
37+
}

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/Button/Button.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { ReactNode } from 'react';
2+
import { Link } from 'wouter';
3+
4+
interface ButtonProps {
5+
children?: ReactNode;
6+
className?: string;
7+
href?: string;
8+
}
9+
10+
const Button = ({ children, className = '', href }: ButtonProps) => {
11+
if ( typeof href === 'string' ) {
12+
return (
13+
<Link href={href}>
14+
<a className={`inline-block rounded bg-slate-600 py-2.5 px-6 text-sm font-bold uppercase text-white hover:bg-slate-500 hover:text-white ${className}`}>
15+
{ children }
16+
</a>
17+
</Link>
18+
);
19+
}
20+
21+
return (
22+
<button className={`inline-block rounded bg-slate-600 py-2.5 px-6 text-sm font-bold uppercase text-white hover:bg-slate-500 hover:text-white ${className}`}>
23+
{ children }
24+
</button>
25+
)
26+
}
27+
28+
export default Button;

src/components/Button/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Button';
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ReactNode } from 'react';
2+
3+
interface ContainerProps {
4+
children?: ReactNode;
5+
className?: string;
6+
}
7+
8+
const Container = ({ children, className = '' }: ContainerProps) => {
9+
return (
10+
<div className={`w-full max-w-7xl my-0 mx-auto px-5 ${className}`}>
11+
{ children }
12+
</div>
13+
)
14+
}
15+
16+
export default Container;

0 commit comments

Comments
 (0)