summaryrefslogtreecommitdiff
path: root/src/components/ProfileManagement.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ProfileManagement.tsx')
-rw-r--r--src/components/ProfileManagement.tsx26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/components/ProfileManagement.tsx b/src/components/ProfileManagement.tsx
index 543609f..67f0645 100644
--- a/src/components/ProfileManagement.tsx
+++ b/src/components/ProfileManagement.tsx
@@ -10,7 +10,8 @@ import {
DialogButton,
ButtonItem,
ModalRoot,
- TextField
+ TextField,
+ Focusable
} from "@decky/ui";
import {
getProfiles,
@@ -50,8 +51,10 @@ function TextInputModal({
const [value, setValue] = useState(defaultValue);
const handleOK = () => {
- onOK(value);
- closeModal?.();
+ if (value.trim()) {
+ onOK(value);
+ closeModal?.();
+ }
};
return (
@@ -74,14 +77,25 @@ function TextInputModal({
</Field>
</div>
- <div style={{ display: "flex", gap: "8px", justifyContent: "flex-end" }}>
+ <Focusable
+ style={{
+ display: "flex",
+ justifyContent: "flex-end",
+ gap: "8px",
+ marginTop: "16px"
+ }}
+ flow-children="horizontal"
+ >
<DialogButton onClick={closeModal}>
{cancelText}
</DialogButton>
- <DialogButton onClick={handleOK} disabled={!value.trim()}>
+ <DialogButton
+ onClick={handleOK}
+ disabled={!value.trim()}
+ >
{okText}
</DialogButton>
- </div>
+ </Focusable>
</div>
</ModalRoot>
);