diff options
| author | AAGaming <aa@bigdumb.gq> | 2022-05-28 21:52:51 -0400 |
|---|---|---|
| committer | AAGaming <aa@bigdumb.gq> | 2022-05-28 21:52:51 -0400 |
| commit | 6e73b2796137984e5290a5d5f3e381362f21bfea (patch) | |
| tree | b88ff7a1f4df0e0f5f94c645f171489611b5aa8a /src/index.tsx | |
| parent | adb8a84d2c313bedd6d6e46408056c3a2677ddb3 (diff) | |
| parent | a5d491256fd058796162ef9e234b7b5fea6b6ef0 (diff) | |
| download | decky-bazzite-buddy-6e73b2796137984e5290a5d5f3e381362f21bfea.tar.gz decky-bazzite-buddy-6e73b2796137984e5290a5d5f3e381362f21bfea.zip | |
Merge branch 'main' of github.com:SteamDeckHomebrew/decky-plugin-template
Diffstat (limited to 'src/index.tsx')
| -rw-r--r-- | src/index.tsx | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/src/index.tsx b/src/index.tsx index dca7ed1..2c40a21 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,15 +1,19 @@ import { - Button, + ButtonItem, definePlugin, Menu, MenuItem, + PanelSection, + PanelSectionRow, ServerAPI, showModal, - staticClasses + staticClasses, } from "decky-frontend-lib"; import { VFC } from "react"; import { FaShip } from "react-icons/fa"; +import logo from "../assets/logo.png"; + // interface AddMethodArgs { // left: number; // right: number; @@ -32,22 +36,31 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => { // }; return ( - <div> - <Button - onClick={(e) => - showModal( - <Menu label="Menu" cancelText="CAAAANCEL" onCancel={() => {}}> - <MenuItem onSelected={() => {}}>Item #1</MenuItem> - <MenuItem onSelected={() => {}}>Item #2</MenuItem> - <MenuItem onSelected={() => {}}>Item #3</MenuItem> - </Menu>, - e.currentTarget ?? window - ) - } - > - Server says yolo - </Button> - </div> + <PanelSection title="Panel Section"> + <PanelSectionRow> + <ButtonItem + layout="below" + onClick={(e) => + showModal( + <Menu label="Menu" cancelText="CAAAANCEL" onCancel={() => {}}> + <MenuItem onSelected={() => {}}>Item #1</MenuItem> + <MenuItem onSelected={() => {}}>Item #2</MenuItem> + <MenuItem onSelected={() => {}}>Item #3</MenuItem> + </Menu>, + e.currentTarget ?? window + ) + } + > + Server says yolo + </ButtonItem> + </PanelSectionRow> + + <PanelSectionRow> + <div style={{ display: "flex", justifyContent: "center" }}> + <img src={logo} /> + </div> + </PanelSectionRow> + </PanelSection> ); }; |
