From f554798ee4b92e9e4e7086485fda8ad49ea4bb61 Mon Sep 17 00:00:00 2001
From: Jonas Dellinger <jonas@dellinger.dev>
Date: Wed, 25 May 2022 21:34:31 +0200
Subject: Added support for static assets

---
 src/index.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index d77e8cf..7d91c6c 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -5,12 +5,14 @@ import {
   MenuItem,
   ServerAPI,
   showModal,
-  staticClasses
+  staticClasses,
 } from "decky-frontend-lib";
-import { VFC } from "react";
 import * as React from "react"; // JSX needs this, since React < 17.0.0 doesn't support the JSX runtime.
+import { VFC } from "react";
 import { FaShip } from "react-icons/fa";
 
+import logo from "../assets/logo.png";
+
 // interface AddMethodArgs {
 //   left: number;
 //   right: number;
@@ -35,6 +37,7 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
   return (
     <div>
       <Button
+        layout="below"
         onClick={(e) =>
           showModal(
             <Menu label="Menu" cancelText="CAAAANCEL" onCancel={() => {}}>
@@ -48,6 +51,7 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
       >
         Server says yolo
       </Button>
+      <img src={logo} />
     </div>
   );
 };
-- 
cgit v1.2.3


From a5d491256fd058796162ef9e234b7b5fea6b6ef0 Mon Sep 17 00:00:00 2001
From: Jonas Dellinger <jonas@dellinger.dev>
Date: Thu, 26 May 2022 13:33:25 +0200
Subject: Use new exported components

---
 src/index.tsx | 47 ++++++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 19 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index 7d91c6c..bd17cff 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,8 +1,10 @@
 import {
-  Button,
+  ButtonItem,
   definePlugin,
   Menu,
   MenuItem,
+  PanelSection,
+  PanelSectionRow,
   ServerAPI,
   showModal,
   staticClasses,
@@ -35,24 +37,31 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
   // };
 
   return (
-    <div>
-      <Button
-        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
-      </Button>
-      <img src={logo} />
-    </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>
   );
 };
 
-- 
cgit v1.2.3

