import { IColorsProps, IEditorProps } from '../commonInterfaces'; import Label from './Label'; interface TextInputProps extends IEditorProps, IColorsProps, Omit, 'className' | 'title'> { dense?: boolean allowEnter?: boolean } function preventEnterCapture(event: React.KeyboardEvent) { if (event.key === 'Enter') { event.preventDefault(); } } function TextInput({ id, label, dense, tooltip, noBorder, noOutline, allowEnter, onKeyDown, dimensions = 'w-full', colors = 'clr-input', ...restProps }: TextInputProps) { const borderClass = noBorder ? '' : 'border px-3'; const outlineClass = noOutline ? '' : 'clr-outline'; return (
{label ?
); } export default TextInput;