Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ui-components package #26

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/bridge-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@eth-optimism/contracts-ts": "^0.17.0",
"@eth-optimism/op-app": "*",
"@eth-optimism/ui-components": "*",
"@eth-optimism/tokenlist": "^9.0.12",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
Expand Down
2 changes: 2 additions & 0 deletions apps/bridge-app/src/routes/Bridge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useOPNetwork } from '@eth-optimism/op-app'
import { TestComponent } from '@eth-optimism/ui-components'

import { Card, CardContent } from '@/components/ui/card'

Expand All @@ -24,6 +25,7 @@ export const Bridge = ({ action }: BridgeProps) => {

return (
<Card className="mt-6 px-6 py-6 shadow-none border-none md:border-solid md:rounded-lg md:shadow-md">
<TestComponent />
<Tabs defaultValue={action} className="w-[500px]">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="deposit" onClick={() => navigate('/deposit')}>
Expand Down
12 changes: 4 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"bridge-app": ["type:app"]
},
"packages": {
"op-app": ["type:package"]
"op-app": ["type:package"],
"ui-components": ["type:package"]
}
},
"targetDefaults": {
Expand All @@ -26,18 +27,13 @@
}
},
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [
"{workspaceRoot}/.prettierrc.js",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/eslintrc.js",
"{workspaceRoot}/nx.json"
],
"production": [
"default"
]
"production": ["default"]
}
}
3 changes: 3 additions & 0 deletions packages/ui-components/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ["../../.eslintrc.js"],
};
25 changes: 25 additions & 0 deletions packages/ui-components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Loading