From cbe5fd9d225fb57093077578770504390dd672af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Fri, 27 Dec 2024 15:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E7=9A=84=E6=96=87=E5=AD=97=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BB=A5=E5=8F=8A=E6=BF=80=E6=B4=BB=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditableDescription.module.css | 7 ++++++- src/components/EditableDescription.tsx | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/EditableDescription.module.css b/src/components/EditableDescription.module.css index 1a7012f..ba2bfa5 100644 --- a/src/components/EditableDescription.module.css +++ b/src/components/EditableDescription.module.css @@ -14,9 +14,14 @@ height: fit-content; overflow: hidden; resize: none; - min-height: calc(1.2em * 2); + min-height: calc(1.2em * 3); max-height: calc(1.2em * 5); } + .description_content { + border: 1px solid transparent; + padding: var(--spacing-xs) var(--spacing-m); + cursor: text; + } .invalid_content { color: var(--color-neutral-focus); font-size: var(--font-size-xs); diff --git a/src/components/EditableDescription.tsx b/src/components/EditableDescription.tsx index 8a71d13..ee500a4 100644 --- a/src/components/EditableDescription.tsx +++ b/src/components/EditableDescription.tsx @@ -41,7 +41,9 @@ export function EditableDescription({ content, onChange }: EditableDescriptionPr Click to add description. ) : ( - content +
setIsEditing(true)}> + {content} +
)}