import {forwardRef} from 'react'; import TextareaAutosize from 'react-autosize-textarea'; import isPropValid from '@emotion/is-prop-valid'; import styled from '@emotion/styled'; import {inputStyles} from 'sentry/styles/input'; import space from 'sentry/styles/space'; type InputProps = Omit[0], 'theme'>; export interface TextAreaProps extends Omit, 'css'>, InputProps { /** * Enable autosizing of the textarea. */ autosize?: boolean; /** * Max number of rows to default to. */ maxRows?: number; /** * Number of rows to default to. */ rows?: number; } const TextAreaControl = forwardRef(function TextAreaControl( {autosize, rows, maxRows, ...p}: TextAreaProps, ref: React.Ref ) { return autosize ? ( ) : (