mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
27 lines
547 B
JavaScript
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}
|
|
/>
|
|
);
|
|
}
|