Files
server/AdminPanel/client/src/components/Input/index.js
2025-08-22 19:02:17 +03:00

27 lines
547 B
JavaScript

import React from 'react';
import styles from './styles.module.css';
export default function Input({
value,
onChange,
placeholder = '',
type = 'text',
error = null,
className = '',
onKeyDown = null,
min = null,
max = null
}) {
return (
<input
type={type}
value={value}
onChange={(e) => onChange(e.target.value)}
onKeyDown={onKeyDown}
placeholder={placeholder}
className={`${styles.input} ${error ? styles.inputError : ''} ${className}`}
min={min}
max={max}
/>
);
}