Skip to content

Commit

Permalink
add version number to pcb viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Jun 9, 2024
1 parent f36653a commit ddc1589
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
28 changes: 7 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@tscircuit/react-fiber": "^1.1.25",
"@tscircuit/soup": "^0.0.32",
"@types/node": "18.7.23",
"@types/react": "^18.0.21",
"@types/react": "^18.3.3",
"next": "^14.1.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
17 changes: 17 additions & 0 deletions src/components/ToolbarOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "@tscircuit/builder"
import { LAYER_NAME_TO_COLOR } from "lib/Drawer"
import { useGlobalStore } from "global-store"
import packageJson from "../../package.json"

interface Props {
children?: any
Expand Down Expand Up @@ -102,6 +103,22 @@ export const ToolbarOverlay = ({ children, elements }: Props) => {
}}
>
{children}
<div
style={{
position: "absolute",
bottom: 4,
right: 8,
pointerEvents: "none",
color: "white",
fontSize: 11,
opacity: isMouseOverContainer ? 0.5 : 0,
transition: "opacity 1s",
transitionDelay: "2s",
fontFamily: "sans-serif",
}}
>
@tscircuit/pcb-viewer@{packageJson.version}
</div>
<div
style={{
position: "absolute",
Expand Down

0 comments on commit ddc1589

Please sign in to comment.