mirror of
https://github.com/SteamDeckHomebrew/decky-plugin-template.git
synced 2025-11-02 00:02:25 -05:00
Merge branch 'main' of github.com:SteamDeckHomebrew/decky-plugin-template
This commit is contained in:
commit
6e73b27961
9 changed files with 145 additions and 965 deletions
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
14
src/types.d.ts
vendored
Normal file
14
src/types.d.ts
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
declare module "*.svg" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.png" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.jpg" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue