mirror of
https://github.com/SteamDeckHomebrew/decky-plugin-template.git
synced 2025-12-17 10:53:01 -06:00
Added support for static assets
This commit is contained in:
parent
76470f49a8
commit
f554798ee4
9 changed files with 120 additions and 949 deletions
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
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