Skip to content

Commit 65f4a16

Browse files
Merge pull request #37 from ankit-tailor/feat/setup-docs
Feat/setup docs
2 parents f93eadb + 7783ef4 commit 65f4a16

File tree

9 files changed

+257
-72
lines changed

9 files changed

+257
-72
lines changed

apps/docs/.storybook/main.js

-41
This file was deleted.

apps/docs/docs/layout.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { ComposerKitProvider } from "@composer-kit/ui/core";
2+
import "./styles.css";
3+
4+
export default function Root({ children }: { children: React.ReactNode }) {
5+
return <ComposerKitProvider>{children}</ComposerKitProvider>;
6+
}

apps/docs/docs/pages/index.mdx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: landing
3+
---
4+
5+
import { HomePage } from "vocs/components";
6+
7+
<HomePage.Root>
8+
<HomePage.Logo />
9+
<HomePage.Tagline>Composer Kit</HomePage.Tagline>
10+
<HomePage.InstallPackage name="@composer-kit/ui" type="add" />
11+
<HomePage.Description>
12+
Ready to use React components for celo
13+
</HomePage.Description>
14+
<HomePage.Buttons>
15+
<HomePage.Button href="/installation" variant="accent">
16+
Get started
17+
</HomePage.Button>
18+
<HomePage.Button href="https://github.com/celo/composer-kit">
19+
GitHub
20+
</HomePage.Button>
21+
</HomePage.Buttons>
22+
</HomePage.Root>

apps/docs/docs/styles.css

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@layer vocs_preflight {
2+
@tailwind base;
3+
}
4+
@tailwind components;
5+
@tailwind utilities;
6+
7+
.vocs_CodeGroup {
8+
margin-right: 0px !important;
9+
margin-left: 0px !important;
10+
}
11+
12+
@tailwind base;
13+
@tailwind components;
14+
@tailwind utilities;
15+
16+
body {
17+
font-family: Arial, Helvetica, sans-serif;
18+
}
19+
20+
@layer utilities {
21+
.text-balance {
22+
text-wrap: balance;
23+
}
24+
}
25+
26+
@layer base {
27+
:root {
28+
--background: 0 0% 100%;
29+
--foreground: 0 0% 3.9%;
30+
--card: 0 0% 100%;
31+
--card-foreground: 0 0% 3.9%;
32+
--popover: 0 0% 100%;
33+
--popover-foreground: 0 0% 3.9%;
34+
--primary: 0 0% 9%;
35+
--primary-foreground: 0 0% 98%;
36+
--secondary: 0 0% 96.1%;
37+
--secondary-foreground: 0 0% 9%;
38+
--muted: 0 0% 96.1%;
39+
--muted-foreground: 0 0% 45.1%;
40+
--accent: 0 0% 96.1%;
41+
--accent-foreground: 0 0% 9%;
42+
--destructive: 0 84.2% 60.2%;
43+
--destructive-foreground: 0 0% 98%;
44+
--border: 0 0% 89.8%;
45+
--input: 0 0% 89.8%;
46+
--ring: 0 0% 3.9%;
47+
--chart-1: 12 76% 61%;
48+
--chart-2: 173 58% 39%;
49+
--chart-3: 197 37% 24%;
50+
--chart-4: 43 74% 66%;
51+
--chart-5: 27 87% 67%;
52+
--radius: 0.5rem;
53+
}
54+
.dark {
55+
--background: 0 0% 3.9%;
56+
--foreground: 0 0% 98%;
57+
--card: 0 0% 3.9%;
58+
--card-foreground: 0 0% 98%;
59+
--popover: 0 0% 3.9%;
60+
--popover-foreground: 0 0% 98%;
61+
--primary: 0 0% 98%;
62+
--primary-foreground: 0 0% 9%;
63+
--secondary: 0 0% 14.9%;
64+
--secondary-foreground: 0 0% 98%;
65+
--muted: 0 0% 14.9%;
66+
--muted-foreground: 0 0% 63.9%;
67+
--accent: 0 0% 14.9%;
68+
--accent-foreground: 0 0% 98%;
69+
--destructive: 0 62.8% 30.6%;
70+
--destructive-foreground: 0 0% 98%;
71+
--border: 0 0% 14.9%;
72+
--input: 0 0% 14.9%;
73+
--ring: 0 0% 83.1%;
74+
}
75+
}
76+
77+
@layer base {
78+
* {
79+
@apply border-border;
80+
}
81+
body {
82+
/* @apply bg-background text-foreground; */
83+
}
84+
}

apps/docs/package.json

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
{
2-
"name": "docs",
2+
"name": "@composer-kit/docs",
33
"version": "0.0.0",
44
"type": "module",
5-
"private": true,
65
"scripts": {
7-
"dev": "storybook dev -p 6006",
8-
"build": "storybook build --docs",
9-
"preview-storybook": "serve storybook-static",
10-
"clean": "rm -rf .turbo && rm -rf node_modules",
11-
"lint": "eslint ./stories/*.stories.tsx --max-warnings 0"
6+
"dev": "vocs dev",
7+
"build": "vocs build",
8+
"preview": "vocs preview"
129
},
1310
"dependencies": {
14-
"@acme/ui": "workspace:*",
11+
"@composer-kit/ui": "workspace:*",
12+
"@types/react": "latest",
1513
"react": "^18.2.0",
16-
"react-dom": "^18.2.0"
14+
"react-dom": "18",
15+
"typescript": "latest",
16+
"viem": "^2.21.55",
17+
"vocs": "latest",
18+
"wagmi": "^2.14.4"
1719
},
1820
"devDependencies": {
19-
"@repo/eslint-config": "workspace:*",
20-
"@storybook/addon-actions": "^8.2.6",
21-
"@storybook/addon-essentials": "^8.2.6",
22-
"@storybook/addon-links": "^8.2.6",
23-
"@storybook/react": "^8.2.6",
24-
"@storybook/react-vite": "^8.2.6",
25-
"@vitejs/plugin-react": "^4.2.1",
26-
"eslint": "^8.57.0",
27-
"serve": "^14.2.1",
28-
"storybook": "^8.2.6",
29-
"@repo/typescript-config": "workspace:*",
30-
"typescript": "5.5.4",
31-
"vite": "^5.1.4"
21+
"tailwindcss": "^3.4.17"
3222
}
3323
}

apps/docs/tailwind.config.js

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/** @type {import('tailwindcss').Config} */
2+
export default {
3+
content: [
4+
"./docs/**/*.{html,js,ts,jsx,tsx,mdx}",
5+
"../../packages/composer-kit/**/*.{html,js,ts,jsx,tsx,mdx}",
6+
"/Users/ankit/Desktop/celo/celo-composer/packages/composer-kit/**/*.{ts,tsx, jsx}",
7+
],
8+
darkMode: "class",
9+
safelist: ["dark"],
10+
theme: {
11+
keyframes: {
12+
shimmer: {
13+
"0%": { transform: "translateX(-100%)" },
14+
"100%": { transform: "translateX(100%)" },
15+
},
16+
spin: {
17+
from: { transform: "rotate(0deg)" },
18+
to: { transform: "rotate(360deg)" },
19+
},
20+
"accordion-down": {
21+
from: { height: "0" },
22+
to: { height: "var(--radix-accordion-content-height)" },
23+
},
24+
"accordion-up": {
25+
from: { height: "var(--radix-accordion-content-height)" },
26+
to: { height: "0" },
27+
},
28+
},
29+
animation: {
30+
shimmer: "shimmer 1.5s infinite linear",
31+
spin: "spin 1s linear infinite",
32+
"accordion-down": "accordion-down 0.2s ease-out",
33+
"accordion-up": "accordion-up 0.2s ease-out",
34+
},
35+
extend: {
36+
boxShadow: {
37+
dropShadow: "0px 1px 0px rgba(0, 0, 0, 0.4)",
38+
},
39+
fontFamily: {
40+
"vietnam-pro": "var(--font-vietnam-pro)",
41+
inter: "var(--font-inter)",
42+
},
43+
colors: {
44+
background: "hsl(var(--background))",
45+
foreground: "hsl(var(--foreground))",
46+
card: {
47+
DEFAULT: "hsl(var(--card))",
48+
foreground: "hsl(var(--card-foreground))",
49+
},
50+
popover: {
51+
DEFAULT: "hsl(var(--popover))",
52+
foreground: "hsl(var(--popover-foreground))",
53+
},
54+
primary: {
55+
DEFAULT: "hsl(var(--primary))",
56+
foreground: "hsl(var(--primary-foreground))",
57+
},
58+
secondary: {
59+
DEFAULT: "hsl(var(--secondary))",
60+
foreground: "hsl(var(--secondary-foreground))",
61+
},
62+
muted: {
63+
DEFAULT: "hsl(var(--muted))",
64+
foreground: "hsl(var(--muted-foreground))",
65+
},
66+
accent: {
67+
DEFAULT: "hsl(var(--accent))",
68+
foreground: "hsl(var(--accent-foreground))",
69+
},
70+
destructive: {
71+
DEFAULT: "hsl(var(--destructive))",
72+
foreground: "hsl(var(--destructive-foreground))",
73+
},
74+
border: "hsl(var(--border))",
75+
input: "hsl(var(--input))",
76+
ring: "hsl(var(--ring))",
77+
},
78+
borderRadius: {
79+
lg: "var(--radius)",
80+
md: "calc(var(--radius) - 2px)",
81+
sm: "calc(var(--radius) - 4px)",
82+
},
83+
},
84+
},
85+
plugins: [],
86+
};

apps/docs/tsconfig.json

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
2-
"extends": "@repo/typescript-config/react-app.json",
3-
"include": ["."],
4-
"exclude": ["dist", "build", "node_modules"]
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"resolveJsonModule": true,
13+
"isolatedModules": true,
14+
"noEmit": true,
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
22+
},
23+
"include": ["**/*.ts", "**/*.tsx"]
524
}

apps/docs/vite.config.ts

-6
This file was deleted.

apps/docs/vocs.config.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineConfig } from "vocs";
2+
3+
export default defineConfig({
4+
title: "Docs",
5+
sidebar: [
6+
{
7+
text: "Installation",
8+
link: "/installation",
9+
},
10+
{
11+
text: "Components",
12+
collapsed: false,
13+
items: [
14+
{
15+
text: "Wallet",
16+
link: "/components/wallet",
17+
},
18+
{
19+
text: "Swap",
20+
link: "/components/swap",
21+
},
22+
],
23+
},
24+
],
25+
});

0 commit comments

Comments
 (0)