style: streamline inputs and selects with more visible borders

- Increase --border opacity in both light and dark modes
- Harmonize Input and Select components with consistent rounded-lg corners
- Replace native selects in MainConverter with styled Select component
This commit is contained in:
2026-02-23 07:56:16 +01:00
parent 9a95e97150
commit d9315ecf7d
3 changed files with 7 additions and 9 deletions

View File

@@ -128,7 +128,7 @@
--accent-foreground: #ffffff; --accent-foreground: #ffffff;
--destructive: #ef4444; --destructive: #ef4444;
--destructive-foreground: #ffffff; --destructive-foreground: #ffffff;
--border: rgba(255, 255, 255, 0.08); --border: rgba(255, 255, 255, 0.15);
--input: rgba(255, 255, 255, 0.05); --input: rgba(255, 255, 255, 0.05);
--ring: rgba(139, 92, 246, 0.5); --ring: rgba(139, 92, 246, 0.5);
--radius: 1rem; --radius: 1rem;
@@ -153,7 +153,7 @@
--accent-foreground: oklch(15% 0.05 255); --accent-foreground: oklch(15% 0.05 255);
--destructive: oklch(60% 0.2 25); --destructive: oklch(60% 0.2 25);
--destructive-foreground: oklch(100% 0 0); --destructive-foreground: oklch(100% 0 0);
--border: rgba(0, 0, 0, 0.06); --border: rgba(0, 0, 0, 0.12);
--input: rgba(0, 0, 0, 0.01); --input: rgba(0, 0, 0, 0.01);
--ring: rgba(139, 92, 246, 0.2); --ring: rgba(139, 92, 246, 0.2);
} }

View File

@@ -9,7 +9,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input <input
type={type} type={type}
className={cn( className={cn(
'flex h-10 w-full rounded-xl border border-border bg-input px-4 py-2', 'flex h-10 w-full rounded-lg border border-border bg-input px-4 py-2',
'text-sm ring-offset-background file:border-0 file:bg-transparent', 'text-sm ring-offset-background file:border-0 file:bg-transparent',
'file:text-sm file:font-medium placeholder:text-muted-foreground', 'file:text-sm file:font-medium placeholder:text-muted-foreground',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:border-primary/50', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:border-primary/50',

View File

@@ -161,17 +161,16 @@ export default function MainConverter() {
</div> </div>
<div className="w-40"> <div className="w-40">
<label className="text-sm font-medium mb-2 block">From</label> <label className="text-sm font-medium mb-2 block">From</label>
<select <Select
value={selectedUnit} value={selectedUnit}
onChange={(e) => setSelectedUnit(e.target.value)} onChange={(e) => setSelectedUnit(e.target.value)}
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
> >
{units.map((unit) => ( {units.map((unit) => (
<option key={unit} value={unit}> <option key={unit} value={unit}>
{unit} {unit}
</option> </option>
))} ))}
</select> </Select>
</div> </div>
<Button <Button
variant="outline" variant="outline"
@@ -184,17 +183,16 @@ export default function MainConverter() {
</Button> </Button>
<div className="w-40"> <div className="w-40">
<label className="text-sm font-medium mb-2 block">To</label> <label className="text-sm font-medium mb-2 block">To</label>
<select <Select
value={targetUnit} value={targetUnit}
onChange={(e) => setTargetUnit(e.target.value)} onChange={(e) => setTargetUnit(e.target.value)}
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
> >
{units.map((unit) => ( {units.map((unit) => (
<option key={unit} value={unit}> <option key={unit} value={unit}>
{unit} {unit}
</option> </option>
))} ))}
</select> </Select>
</div> </div>
</div> </div>