import { ChangeEvent, CSSProperties, TextareaHTMLAttributes } from 'react'; import { CommandLanguage } from './commandHighlight'; type NativeTextareaProps = Omit, 'onChange' | 'value' | 'defaultValue' | 'style'>; export interface CommandEditorProps extends NativeTextareaProps { /** Controlled value. Omit (with `defaultValue`) for uncontrolled usage. */ value?: string; defaultValue?: string; onChange?: (event: ChangeEvent) => void; /** Highlight language. Defaults to shell. */ language?: CommandLanguage; /** Extra classes for the bordered wrapper (e.g. a different background). */ className?: string; rows?: number; /** Inline styles forwarded to the textarea (e.g. minHeight). */ style?: CSSProperties; } /** * A drop-in replacement for a command/script `