From 97015a91ad12f669b19df4645f0d93b24848a04d Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Tue, 15 Oct 2024 15:18:19 +0200 Subject: [PATCH] fix(frontend): Fix styling inconsistencies in input elements (#8337) - Apply consistent border styling to `Input`, `Select`, and `Textarea` - Remove `rounded-xl` from node input elements - Add `whitespace-nowrap` to `CustomNode` header category tags --------- Co-authored-by: Zamil Majdy --- autogpt_platform/frontend/src/app/globals.css | 10 +++++++++- .../frontend/src/components/CustomNode.tsx | 2 +- .../frontend/src/components/node-input-components.tsx | 8 ++++---- autogpt_platform/frontend/src/components/ui/input.tsx | 2 +- autogpt_platform/frontend/src/components/ui/select.tsx | 2 +- .../frontend/src/components/ui/textarea.tsx | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/autogpt_platform/frontend/src/app/globals.css b/autogpt_platform/frontend/src/app/globals.css index 130a1e630bb8..7930a00b3c88 100644 --- a/autogpt_platform/frontend/src/app/globals.css +++ b/autogpt_platform/frontend/src/app/globals.css @@ -27,7 +27,7 @@ --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; --border: 240 5.9% 90%; - --input: 240 5.9% 90%; + --input: 240 5.9% 85%; --ring: 240 5.9% 10%; --radius: 0.5rem; --chart-1: 12 76% 61%; @@ -72,4 +72,12 @@ body { @apply bg-background text-foreground; } + + .agpt-border-input { + @apply border-input focus-visible:border-gray-400 focus-visible:outline-none; + } + + .agpt-shadow-input { + @apply shadow-sm focus-visible:shadow-md; + } } diff --git a/autogpt_platform/frontend/src/components/CustomNode.tsx b/autogpt_platform/frontend/src/components/CustomNode.tsx index c08e4a2e9715..975bc87ab721 100644 --- a/autogpt_platform/frontend/src/components/CustomNode.tsx +++ b/autogpt_platform/frontend/src/components/CustomNode.tsx @@ -646,7 +646,7 @@ export function CustomNode({ {beautifyString(category.category.toLowerCase())} diff --git a/autogpt_platform/frontend/src/components/node-input-components.tsx b/autogpt_platform/frontend/src/components/node-input-components.tsx index a55fa0902cd1..f2243375962b 100644 --- a/autogpt_platform/frontend/src/components/node-input-components.tsx +++ b/autogpt_platform/frontend/src/components/node-input-components.tsx @@ -459,7 +459,7 @@ const NodeKeyValueInput: FC<{ ))}