From 156c82695c84877382f195dc5e674f20eae4155d Mon Sep 17 00:00:00 2001 From: toshusai Date: Fri, 20 Oct 2023 15:14:02 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20textarea=E3=81=AE=E3=82=AF=E3=83=AA?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=83=95=E3=82=A9=E3=83=BC=E3=82=AB=E3=82=B9?= =?UTF-8?q?=E9=A0=98=E5=9F=9F=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react/src/components/TextArea/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react/src/components/TextArea/index.tsx b/packages/react/src/components/TextArea/index.tsx index b4436b4ed..53d214287 100644 --- a/packages/react/src/components/TextArea/index.tsx +++ b/packages/react/src/components/TextArea/index.tsx @@ -131,7 +131,7 @@ const TextArea = forwardRef( > @@ -170,7 +170,6 @@ const TextFieldLabel = styled(FieldLabel)` const StyledTextareaContainer = styled.div<{ rows: number; invalid: boolean }>` position: relative; overflow: hidden; - padding: 0 8px; ${(p) => theme((o) => [ @@ -204,10 +203,11 @@ const StyledTextarea = styled.textarea<{ noBottomPadding: boolean }>` width: calc(100% / 0.875); font-size: calc(14px / 0.875); line-height: calc(22px / 0.875); - padding: calc(9px / 0.875) 0 ${(p) => (p.noBottomPadding ? 0 : '')}; + padding: calc(9px / 0.875) 8px ${(p) => (p.noBottomPadding ? 0 : 'calc(9px / 0.875)')} 8px; + box-sizing: border-box; - ${({ rows = 1 }) => css` - height: calc(22px / 0.875 * ${rows}); + ${({ rows = 1, noBottomPadding }) => css` + height: calc(22px / 0.875 * ${rows} + ${noBottomPadding ? '18px' : 0}); `}; /* Display box-shadow for iOS Safari */ From 50550496876f3733a17d8f439c32ba3677f73fd9 Mon Sep 17 00:00:00 2001 From: toshusai Date: Fri, 20 Oct 2023 15:25:14 +0900 Subject: [PATCH 2/2] style: format --- packages/react/src/components/TextArea/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/TextArea/index.tsx b/packages/react/src/components/TextArea/index.tsx index 53d214287..c859d19f9 100644 --- a/packages/react/src/components/TextArea/index.tsx +++ b/packages/react/src/components/TextArea/index.tsx @@ -203,7 +203,8 @@ const StyledTextarea = styled.textarea<{ noBottomPadding: boolean }>` width: calc(100% / 0.875); font-size: calc(14px / 0.875); line-height: calc(22px / 0.875); - padding: calc(9px / 0.875) 8px ${(p) => (p.noBottomPadding ? 0 : 'calc(9px / 0.875)')} 8px; + padding: calc(9px / 0.875) 8px + ${(p) => (p.noBottomPadding ? 0 : 'calc(9px / 0.875)')} 8px; box-sizing: border-box; ${({ rows = 1, noBottomPadding }) => css`