From 30f88c6f9dfa6d63ba54d45f1c6fb1859bd5d685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 23 Feb 2026 07:48:06 +0100 Subject: [PATCH] feat: replace category grid with select dropdown in units converter - Consolidate category selection into the main converter card - Use a space-saving Select component for category switching - Add category color indicator to the select dropdown --- components/ui/Select.tsx | 2 +- components/units/converter/MainConverter.tsx | 47 +++++++------------- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/components/ui/Select.tsx b/components/ui/Select.tsx index 3c9ccba..c978162 100644 --- a/components/ui/Select.tsx +++ b/components/ui/Select.tsx @@ -18,7 +18,7 @@ const Select = React.forwardRef( )} setSelectedMeasure(e.target.value as Measure)} + className="h-9 text-xs" style={{ - backgroundColor: - selectedMeasure === measure - ? getCategoryColorHex(measure) - : undefined, - borderColor: selectedMeasure !== measure - ? getCategoryColorHex(measure) - : undefined, - color: selectedMeasure === measure ? 'white' : undefined, + borderLeft: `4px solid ${getCategoryColorHex(selectedMeasure)}`, }} > - {formatMeasureName(measure)} - - ))} + {measures.map((measure) => ( + + ))} + + - - - - {/* Input Section */} - - - Convert {formatMeasureName(selectedMeasure)}