File tree Expand file tree Collapse file tree
packages/sdk/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ const ExpandedTextEditorInner = ({
130130 return (
131131 < textarea
132132 ref = { textareaRef }
133- className = "flex-1 resize-none bg-transparent text-sm outline-none"
133+ className = "flex-1 resize-none bg-transparent pt-2 text-sm outline-none"
134134 defaultValue = { value }
135135 onChange = { ( e ) => {
136136 latestValueRef . current = e . target . value ;
Original file line number Diff line number Diff line change 88 useRef ,
99 useState ,
1010} from 'react' ;
11+ import AutoSizeTextarea from 'react-textarea-autosize' ;
1112import { useTranslation } from '../../../context/app/i18n' ;
1213import { ExpandMarkdownEditor , MarkdownLongTextEditor } from '../../editor' ;
1314import { isMarkdownShowAs , normalizeMarkdownValue } from '../../editor/long-text/utils' ;
@@ -236,7 +237,9 @@ const GridMarkdownEditorBase: ForwardRefRenderFunction<
236237 { isMarkdown && (
237238 < div
238239 className = {
239- isReadonly ? getReadonlyClassName ( canExpandReadonly , 'rounded-md text-sm' ) : undefined
240+ isReadonly
241+ ? getReadonlyClassName ( canExpandReadonly , 'rounded-md px-2 pt-1 text-sm' )
242+ : undefined
240243 }
241244 >
242245 < MarkdownLongTextEditor
@@ -262,11 +265,12 @@ const GridMarkdownEditorBase: ForwardRefRenderFunction<
262265 ) }
263266 { ! isMarkdown && ! isReadonly && (
264267 < >
265- < textarea
268+ < AutoSizeTextarea
266269 ref = { textareaRef }
267270 className = "w-full resize-none rounded border-none bg-background px-2 pt-1 text-[13px] leading-[1.4rem] focus-visible:outline-none"
268271 value = { editorValue }
269- rows = { 2 }
272+ minRows = { 2 }
273+ maxRows = { 5 }
270274 onBlur = { ( ) => persistValue ( latestValueRef . current ) }
271275 onChange = { ( e ) => {
272276 const val = e . target . value ;
You can’t perform that action at this time.
0 commit comments