import { TextareaAutosizeProps } from 'react-textarea-autosize'; /** * Conditional props for auto-height functionality */ export type TextareaAutosizeConditionalProps = { /** * Auto height mode on typing */ autoHeight: true; /** * Maximum number of rows when auto-height is enabled */ maxRows?: TextareaAutosizeProps["maxRows"]; /** * Minimum number of rows when auto-height is enabled */ minRows?: TextareaAutosizeProps["minRows"]; } | { /** * Auto height mode on typing * @default false */ autoHeight?: false; maxRows?: never; minRows?: never; }; /** * State object passed to onChange callback */ export type TextareaState = { /** * Current value of the textarea */ value?: string | number | readonly string[]; };