import clsx from 'clsx'; import { CProps } from '@/components/props'; import Label from './Label'; interface TextInputProps extends CProps.Editor, CProps.Colors, CProps.Input { /** 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. */ function TextInput({ id, label, dense, noBorder, noOutline, allowEnter, disabled, className, colors = 'clr-input', onKeyDown, ...restProps }: TextInputProps) { return (
); } export default TextInput;