({ className, error, ...props })
| 6 | } |
| 7 | |
| 8 | const Input: React.FC<InputProps> = ({ className, error, ...props }) => { |
| 9 | return ( |
| 10 | <div className="w-full"> |
| 11 | <input |
| 12 | className={clsx( |
| 13 | 'w-full px-3 py-2 bg-secondary border rounded-md transition-colors duration-200', |
| 14 | 'focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent', |
| 15 | 'disabled:opacity-50 disabled:cursor-not-allowed', |
| 16 | error ? 'border-error' : 'border-border', |
| 17 | className |
| 18 | )} |
| 19 | {...props} |
| 20 | /> |
| 21 | {error && ( |
| 22 | <p className="mt-1 text-sm text-error">{error}</p> |
| 23 | )} |
| 24 | </div> |
| 25 | ); |
| 26 | }; |
| 27 | |
| 28 | export default Input; |
nothing calls this directly
no outgoing calls
no test coverage detected