From 542f5f3a88a2df23d2e8f7e107f66226c1f35271 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 May 2024 22:40:51 +0200 Subject: [PATCH] Improve style of multiline text area (#2885) --- src/renderer/components/inputs/TextInput.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/inputs/TextInput.tsx b/src/renderer/components/inputs/TextInput.tsx index cd2733bb6..beedd5726 100644 --- a/src/renderer/components/inputs/TextInput.tsx +++ b/src/renderer/components/inputs/TextInput.tsx @@ -14,7 +14,7 @@ import { DragHandleSVG } from '../CustomIcons'; import { AutoLabel } from './InputContainer'; import { InputProps } from './props'; -const DEFAULT_SIZE = { width: 240, height: 80 } as const; +const DEFAULT_SIZE = { width: 222, height: 80 } as const; const invalidRegexCache = new Map(); const getInvalidRegex = (pattern: string): RegExp | undefined => { @@ -208,7 +208,7 @@ export const TextInput = memo( ), }} minHeight={80} - minWidth={240} + minWidth={DEFAULT_SIZE.width} scale={zoom} size={size} onResize={(e, direction, ref, d) => { @@ -227,9 +227,12 @@ export const TextInput = memo( className="nodrag" disabled={isLocked || isConnected} draggable={false} + fontSize="14px" h="100%" maxLength={maxLength ?? undefined} placeholder={placeholder ?? label} + px={3} + py={1} resize="none" value={displayText ?? ''} w="full"