Skip to content

Commit

Permalink
Tabs works but in controlled mode (UiKit issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
Powerm1nt committed Dec 18, 2024
1 parent 1e41098 commit 5829eec
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@eslint/js": "^9.17.0",
"@types/react": "^18.2.52",
"@types/react-dom": "^18.2.18",
"@types/styled-components": "^5.1.34",
"@vitejs/plugin-react-swc": "^3.6.0",
"@yao-pkg/pkg": "^6.1.1",
"esbuild": "^0.20.0",
Expand Down
4 changes: 3 additions & 1 deletion src/PkDash/Views/ProjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import { Header } from "../../Common/UiComponents/Header";
import ProjectSettings from "./Tabs/ProjectSettings";
import { Releases } from "./Tabs/Releases";
import { Packages } from "./Tabs/Packages";
import { useState } from "react";

export default function ProjectView() {
const [tabSelected, setTabSelected] = useState(0);
return (
<AppActivity theme={"Light"} direction={"Vertical"}>
<Header displayBackground={false} />

<UiApp>
<StackLayout direction={"Vertical"}>
<Tabs>
<Tabs selectedIndex={tabSelected} onSelect={(e) => setTabSelected(e)}>
<TabList>
<Tab id={"releases"}>Releases</Tab>
<Tab id={"packages"}>Packages</Tab>
Expand Down

0 comments on commit 5829eec

Please sign in to comment.