aboutsummaryrefslogtreecommitdiff
path: root/src/components/UI/Input.tsx
blob: e6a84c0c9f056334e52b7bc37692505d58f76861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
interface InputProps {
  value: string | number
  onChange: (value: string) => void
  placeholder?: string
  type?: string
  min?: number
  max?: number
}

export default function Input({ value, onChange, placeholder, type = 'text', min, max }: InputProps) {
  return (
    <input
      type={type}
      value={value}
      placeholder={placeholder}
      min={min}
      max={max}
      onChange={(e) => onChange(e.target.value)}
      className="w-full h-7 px-2 rounded-md text-ui-sm text-text-primary bg-editor-surface border transition-all duration-150 outline-none placeholder:text-text-muted focus:border-accent"
      style={{ borderColor: 'var(--color-panel-border)' }}
    />
  )
}