import React from 'react'; import classNames from 'classnames'; import './TextInput.scss'; export type InputProps = { disabled?: boolean; error?: boolean | string; focus?: boolean; label?: string; onChange?: (value: string) => void; onChangeEvent?: (event: React.ChangeEvent) => void; }; export type TextInputProps = InputProps & Omit, 'onChange'>; export const TextInput = React.forwardRef( ( { className, disabled, error, focus, placeholder, label, onChange, onChangeEvent, ...rest }: TextInputProps, ref: React.Ref ) => { return ( { onChange?.(event.target.value); onChangeEvent?.(event); }} {...rest} /> ); } ); TextInput.displayName = 'TextInput';