import { InputProps } from './types'; import { useRef } from 'react'; const Input = ({ id, name, type, value, isAutoFocused = false, placeholder, required = false, maxLength, className = '', colorVariant = 'silver', borderVariant = 'thick', textSize = 'medium', children, labelBgClassName = 'bg-white dark:bg-raisin-black', onChange, onPaste, onKeyDown, }: InputProps) => { const colorStyles = { silver: 'border-silver dark:border-silver/40', jet: 'border-jet', gray: 'border-gray-5000 dark:text-silver', }; const borderStyles = { thin: 'border', thick: 'border-2', }; const textSizeStyles = { small: 'text-sm', medium: 'text-base', }; const inputRef = useRef(null); const hasValue = value !== undefined && value !== null && value !== ''; return (
{children} {placeholder && ( )}
); }; export default Input;