summaryrefslogtreecommitdiff
path: root/src/components/UninstallButton.tsx
diff options
context:
space:
mode:
authorKurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>2025-07-29 07:53:45 -0700
committerGitHub <noreply@github.com>2025-07-29 10:53:45 -0400
commit0b5e71fe916e92ef9ecf7de91ca43371c4bd6d25 (patch)
tree30793600da162d9d8fcc63cddeebb1e5a0b058cb /src/components/UninstallButton.tsx
parent526e4e590bb0125f7f7a08e214986afec73e7439 (diff)
downloadDecky-Framegen-0b5e71fe916e92ef9ecf7de91ca43371c4bd6d25.tar.gz
Decky-Framegen-0b5e71fe916e92ef9ecf7de91ca43371c4bd6d25.zip
wording and layout tweaks (#125)v0.11.8
* wording and layout tweaks * red in remove button * reorganize frontend components * fix ld preload permissions issue for decky 3.1.10 * bump ver
Diffstat (limited to 'src/components/UninstallButton.tsx')
-rw-r--r--src/components/UninstallButton.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/UninstallButton.tsx b/src/components/UninstallButton.tsx
new file mode 100644
index 0000000..1f55548
--- /dev/null
+++ b/src/components/UninstallButton.tsx
@@ -0,0 +1,29 @@
+import { PanelSectionRow, ButtonItem } from "@decky/ui";
+import { MESSAGES } from "../utils/constants";
+
+interface UninstallButtonProps {
+ pathExists: boolean | null;
+ uninstalling: boolean;
+ onUninstallClick: () => void;
+}
+
+export function UninstallButton({ pathExists, uninstalling, onUninstallClick }: UninstallButtonProps) {
+ if (pathExists !== true) return null;
+
+ return (
+ <PanelSectionRow>
+ <ButtonItem
+ layout="below"
+ onClick={onUninstallClick}
+ disabled={uninstalling}
+ >
+ <div style={{
+ color: '#ef4444',
+ fontWeight: 'bold'
+ }}>
+ {uninstalling ? MESSAGES.uninstalling : MESSAGES.uninstallButton}
+ </div>
+ </ButtonItem>
+ </PanelSectionRow>
+ );
+}