From c698a71c3dba8f6e99b8f5dfe79c07638b4e6abc Mon Sep 17 00:00:00 2001 From: James Kerr Date: Wed, 24 Jan 2024 15:28:08 -0800 Subject: [PATCH] Clean Up Forms Everywhere --- apps/zui/src/components/forms.module.css | 5 -- .../src/js/components/LakeModals/LakeForm.tsx | 6 +- .../components/LakeModals/ViewLakeModal.tsx | 10 +-- .../views/histogram-pane/settings-form.tsx | 6 +- .../src/views/session-page/pins/dialog.tsx | 2 +- .../session-page/pins/generic-pin-form.tsx | 63 +++++++++---------- 6 files changed, 40 insertions(+), 52 deletions(-) diff --git a/apps/zui/src/components/forms.module.css b/apps/zui/src/components/forms.module.css index 39f802376c..c2d137b132 100644 --- a/apps/zui/src/components/forms.module.css +++ b/apps/zui/src/components/forms.module.css @@ -197,8 +197,3 @@ flex-direction: column; gap: 10px; } - -.form input[readonly] { - border: none; - padding: 0 var(--form-border-radius); -} diff --git a/apps/zui/src/js/components/LakeModals/LakeForm.tsx b/apps/zui/src/js/components/LakeModals/LakeForm.tsx index 1b010a1d4c..179cfca654 100644 --- a/apps/zui/src/js/components/LakeModals/LakeForm.tsx +++ b/apps/zui/src/js/components/LakeModals/LakeForm.tsx @@ -147,8 +147,8 @@ const LakeForm = ({onClose, lake}: Props) => { return (
-
-
+
+
{ autoFocus />
-
+
{

{name}

-
-
+
+
{ value={port ? [host, port].join(":") : host} />
-
+
-
+
-
+
diff --git a/apps/zui/src/views/histogram-pane/settings-form.tsx b/apps/zui/src/views/histogram-pane/settings-form.tsx index 406b72e342..f26369e7c9 100644 --- a/apps/zui/src/views/histogram-pane/settings-form.tsx +++ b/apps/zui/src/views/histogram-pane/settings-form.tsx @@ -43,8 +43,8 @@ export function SettingsForm(props: Props) { onSubmit={form.handleSubmit(onSubmit)} className={classNames(styles.settingsForm, forms.form)} > -
-
+
+
-
+
) { @@ -21,33 +12,35 @@ export function GenericPinForm(props: PinFormProps) { onSubmit={(e) => props.onSubmit(getFormData(e))} onReset={props.onReset} > - - -