diff options
Diffstat (limited to 'src/components/InstallationStatus.tsx')
| -rw-r--r-- | src/components/InstallationStatus.tsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/InstallationStatus.tsx b/src/components/InstallationStatus.tsx new file mode 100644 index 0000000..713b5e1 --- /dev/null +++ b/src/components/InstallationStatus.tsx @@ -0,0 +1,28 @@ +import { PanelSectionRow, ButtonItem } from "@decky/ui"; +import { MESSAGES, STYLES } from "../utils/constants"; + +interface InstallationStatusProps { + pathExists: boolean | null; + installing: boolean; + onInstallClick: () => void; +} + +export function InstallationStatus({ pathExists, installing, onInstallClick }: InstallationStatusProps) { + if (pathExists !== false) return null; + + return ( + <> + <PanelSectionRow> + <div style={STYLES.statusNotInstalled}> + {MESSAGES.modNotInstalled} + </div> + </PanelSectionRow> + + <PanelSectionRow> + <ButtonItem layout="below" onClick={onInstallClick} disabled={installing}> + {installing ? MESSAGES.installing : MESSAGES.installButton} + </ButtonItem> + </PanelSectionRow> + </> + ); +} |
