summaryrefslogtreecommitdiff
path: root/src/components/NowPlayingTab.tsx
blob: 188c56abc368935e033d1500f92ccf3112dfa77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui";
import { ConfigurationData } from "../config/configSchema";
import { GameTarget } from "../hooks/useGameConfiguration";
import { GameConfigurationControls } from "./GameConfigurationControls";

interface Props {
  game: GameTarget;
  config: ConfigurationData;
  onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string | string[]) => Promise<void>;
}

export function NowPlayingTab({ game, config, onConfigChange }: Props) {
  return (
    <Focusable>
      <PanelSection>
        <PanelSectionRow>
          <Field
            label={game.name}
          />
        </PanelSectionRow>
      </PanelSection>
      <GameConfigurationControls config={config} onConfigChange={onConfigChange} showWorkarounds={false} />
    </Focusable>
  );
}