From 3172c3edeb45b665b1eede3565e5761115e227f1 Mon Sep 17 00:00:00 2001 From: Takhyun Kim Date: Thu, 12 Oct 2023 14:45:15 +0900 Subject: [PATCH] feat(textfield): apply spread syntax to sing textfield InputProps --- .../src/components/TextField/TextField.tsx | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/design-system/src/components/TextField/TextField.tsx b/packages/design-system/src/components/TextField/TextField.tsx index e205348b..fc5be331 100644 --- a/packages/design-system/src/components/TextField/TextField.tsx +++ b/packages/design-system/src/components/TextField/TextField.tsx @@ -18,6 +18,7 @@ const SingleTextField = (props: SingleTextFieldProps) => { rightIconSx, onLeftIconClick, onRightIconClick, + InputProps, ...restProps } = props; @@ -28,20 +29,23 @@ const SingleTextField = (props: SingleTextFieldProps) => { hasLeftIcon={Boolean(leftIcon)} hasRightIcon={Boolean(rightIcon)} InputProps={{ - startAdornment: leftIcon && ( - - ), - endAdornment: rightIcon && ( - - ), + ...{ + startAdornment: leftIcon && ( + + ), + endAdornment: rightIcon && ( + + ), + }, + ...InputProps, }} /> );