Skip to content

Commit 571296d

Browse files
committed
feat: TokenChainPill
1 parent 36fde1b commit 571296d

4 files changed

Lines changed: 86 additions & 14 deletions

File tree

packages/smart-routing-address-react/package.json

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"name": "@zerodev/smart-routing-address-react",
33
"version": "0.0.1",
4-
"description": "React hooks + provider for ZeroDev Smart Routing Address deposits",
4+
"description": "React hooks, provider, and UI for ZeroDev Smart Routing Address deposits",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/zerodevapp/zerodev-wallet-sdk.git",
88
"directory": "packages/smart-routing-address-react"
99
},
10-
"sideEffects": false,
10+
"sideEffects": [
11+
"**/*.css"
12+
],
1113
"main": "./dist/index.cjs",
1214
"module": "./dist/index.mjs",
1315
"types": "./dist/_types/index.d.ts",
@@ -16,50 +18,69 @@
1618
"types": "./dist/_types/index.d.ts",
1719
"import": "./dist/index.mjs",
1820
"require": "./dist/index.cjs"
19-
}
21+
},
22+
"./styles.css": "./dist/styles.css"
2023
},
2124
"files": [
2225
"dist",
2326
"src/**/*.ts",
2427
"src/**/*.tsx",
2528
"!dist/**/*.tsbuildinfo",
2629
"!src/**/*.test.ts",
27-
"!src/**/*.test.tsx"
30+
"!src/**/*.test.tsx",
31+
"!src/**/*.stories.ts",
32+
"!src/**/*.stories.tsx"
2833
],
2934
"scripts": {
30-
"build": "pnpm run clean && pnpm run build:js && pnpm run build:types",
35+
"build": "pnpm run clean && pnpm run build:css && pnpm run build:js && pnpm run build:types",
36+
"build:css": "npx @tailwindcss/cli -i ./src/styles.css -o ./dist/styles.css --minify",
3137
"build:js": "vite build",
3238
"build:types": "tsc --project ./tsconfig.build.json --outDir ./dist/_types --emitDeclarationOnly --declaration --declarationMap",
3339
"dev": "tsc --watch",
40+
"dev:css": "npx @tailwindcss/cli -i ./src/styles.css -o ./dist/styles.css --watch",
3441
"typecheck": "tsc --noEmit --project ./tsconfig.build.json",
3542
"clean": "rm -rf dist",
3643
"test": "vitest run",
37-
"test:watch": "vitest"
44+
"test:watch": "vitest",
45+
"storybook": "storybook dev -p 6008",
46+
"build-storybook": "storybook build"
3847
},
3948
"keywords": [
4049
"react",
4150
"hooks",
51+
"components",
4252
"smart-routing",
4353
"deposit",
4454
"zerodev",
4555
"web3"
4656
],
57+
"dependencies": {
58+
"@zerodev/react-ui": "workspace:*"
59+
},
4760
"peerDependencies": {
4861
"@zerodev/smart-routing-address": "^0.2.5",
4962
"react": "^18.0.0 || ^19.0.0",
5063
"react-dom": "^18.0.0 || ^19.0.0",
5164
"viem": "^2.47.18"
5265
},
5366
"devDependencies": {
67+
"@storybook/addon-a11y": "^10.3.3",
68+
"@storybook/addon-docs": "^10.3.3",
69+
"@storybook/react-vite": "^10.3.3",
70+
"@tailwindcss/cli": "^4.2.2",
71+
"@tailwindcss/postcss": "^4.2.2",
5472
"@testing-library/react": "^16.3.0",
5573
"@types/react": "~19.2.14",
5674
"@types/react-dom": "^19",
5775
"@vitejs/plugin-react": "^4.7.0",
5876
"@vitest/coverage-v8": "^4.0.18",
5977
"@zerodev/smart-routing-address": "^0.2.5",
6078
"happy-dom": "^20.6.0",
79+
"postcss": "^8.5.8",
6180
"react": "19.2.0",
6281
"react-dom": "19.2.0",
82+
"storybook": "^10.3.3",
83+
"tailwindcss": "^4.2.2",
6384
"typescript": "5.9.3",
6485
"viem": "^2.47.18",
6586
"vite": "^6.4.1",

packages/smart-routing-address-react/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/**
22
* @zerodev/smart-routing-address-react
3-
* React hooks + provider for ZeroDev Smart Routing Address deposits.
3+
* React hooks, provider, and UI for ZeroDev Smart Routing Address deposits.
44
*/
55

6+
// Components
7+
export type { TokenChainPillProps } from './components/TokenChainPill'
8+
export { TokenChainPill } from './components/TokenChainPill'
9+
610
// Provider
711
export type { SmartRoutingAddressProviderProps } from './context/SmartRoutingAddressProvider'
812
export { SmartRoutingAddressProvider } from './context/SmartRoutingAddressProvider'

packages/smart-routing-address-react/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default defineConfig({
1717
'react-dom',
1818
'react/jsx-runtime',
1919
'react/jsx-dev-runtime',
20+
'@zerodev/react-ui',
2021
'@zerodev/smart-routing-address',
2122
'viem',
2223
],

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)