From 4a0973787831d9846e94b67f55232a183b14200d Mon Sep 17 00:00:00 2001 From: nijuy Date: Thu, 16 May 2024 23:30:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20`StyledSearchPrefixContainer`?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TextField/TextField.style.ts | 4 ---- src/components/TextField/TextField.tsx | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/TextField/TextField.style.ts b/src/components/TextField/TextField.style.ts index 2701753..5472a5b 100644 --- a/src/components/TextField/TextField.style.ts +++ b/src/components/TextField/TextField.style.ts @@ -16,10 +16,6 @@ export const StyledSuffixIconContainer = styled.div` display: none; `; -export const StyledSearchPrefixContainer = styled.div` - display: flex; -`; - export const StyledTextFieldWrapper = styled.div` width: ${({ $width }) => $width}; height: 46px; diff --git a/src/components/TextField/TextField.tsx b/src/components/TextField/TextField.tsx index 9c427d9..dcd9789 100644 --- a/src/components/TextField/TextField.tsx +++ b/src/components/TextField/TextField.tsx @@ -1,7 +1,6 @@ import { StyledFieldLabel, StyledHelperLabel, - StyledSearchPrefixContainer, StyledSuffixIconContainer, StyledSuffixText, StyledTextField, @@ -32,7 +31,7 @@ export const TextField = ({ $isDisabled={props.disabled} $width={width} > - {searchPrefix} + {searchPrefix} {typeof suffix === 'string' ? ( {suffix} From 8281059b229937508f9abf4c81a76c5ea962eff0 Mon Sep 17 00:00:00 2001 From: nijuy Date: Thu, 16 May 2024 23:32:22 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20`StyledTextFieldWrapper`=20?= =?UTF-8?q?=EB=82=B4=EB=B6=80=20svg=EC=97=90=20flex-shrink:=200=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 내부 svg는 searchPrefix, suffix에 Icon이 들어가는 경우 - size 보장을 위해 설정 --- src/components/TextField/TextField.style.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/TextField/TextField.style.ts b/src/components/TextField/TextField.style.ts index 5472a5b..85a7dcd 100644 --- a/src/components/TextField/TextField.style.ts +++ b/src/components/TextField/TextField.style.ts @@ -46,6 +46,10 @@ export const StyledTextFieldWrapper = styled.div` display: flex; cursor: pointer; } + + svg { + flex-shrink: 0; + } `; export const StyledTextField = styled.input`