import clsx from 'clsx'; import { Label } from './label1'; import { type Editor, type ErrorProcessing, type Titled } from '../props'; import { ErrorField } from './error-field'; interface TextInputProps extends Editor, ErrorProcessing, Titled, React.ComponentProps<'input'> { /** Indicates that the input should be transparent. */ transparent?: boolean; /** Indicates that padding should be minimal. */ dense?: boolean; /** Capture enter key. */ allowEnter?: boolean; } function preventEnterCapture(event: React.KeyboardEvent) { if (event.key === 'Enter') { event.preventDefault(); } } /** * Displays a customizable input with a label. */ export function TextInput({ id, label, dense, noBorder, noOutline, allowEnter, disabled, transparent, className, onKeyDown, error, ...restProps }: TextInputProps) { return (
); }