Files
jmap-webmail/components/ui/input.tsx
T
Matthieu MALVACHE ba0751eb19 fix: Replace hardcoded colors with CSS variables for proper light/dark mode switching
- Updated all components to use theme CSS variables instead of hardcoded gray colors
- Fixed issue where light mode only changed borders but not backgrounds
- Components now properly respect theme switching with consistent colors
- Replaced bg-gray-*, text-gray-*, border-gray-* with theme variables (bg-background, text-foreground, etc.)

Affected components:
- Main page layout
- Login page
- Sidebar navigation
- All UI components (Button, Input, Toast, Language Switcher)
- Email viewer, list, and list items
2025-10-02 01:58:38 +02:00

29 lines
942 B
TypeScript

import * as React from "react";
import { cn } from "@/lib/utils";
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground transition-all duration-200",
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
"placeholder:text-muted-foreground",
"hover:border-muted-foreground",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring",
"disabled:cursor-not-allowed disabled:opacity-50",
className
)}
ref={ref}
{...props}
/>
);
}
);
Input.displayName = "Input";
export { Input };