From 545b919074da7e9db8db9fb3c73699a0ac25c562 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Thu, 14 Sep 2023 13:53:32 +0800 Subject: [PATCH] refactor(ui): remove unused style settings (#4464) remove unused isSuffixVisible style settings --- .../InputFields/InputField/index.module.scss | 1 - .../components/InputFields/InputField/index.tsx | 15 ++------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/ui/src/components/InputFields/InputField/index.module.scss b/packages/ui/src/components/InputFields/InputField/index.module.scss index 28553d638..c73bb074e 100644 --- a/packages/ui/src/components/InputFields/InputField/index.module.scss +++ b/packages/ui/src/components/InputFields/InputField/index.module.scss @@ -56,7 +56,6 @@ } } - &.isSuffixVisible, &.isSuffixFocusVisible:focus-within { input { padding-right: _.unit(10); diff --git a/packages/ui/src/components/InputFields/InputField/index.tsx b/packages/ui/src/components/InputFields/InputField/index.tsx index b26b9e15d..269fff97a 100644 --- a/packages/ui/src/components/InputFields/InputField/index.tsx +++ b/packages/ui/src/components/InputFields/InputField/index.tsx @@ -12,21 +12,11 @@ export type Props = Omit, 'prefix'> & { isDanger?: boolean; prefix?: ReactElement; suffix?: ReactElement; - isSuffixVisible?: boolean; isSuffixFocusVisible?: boolean; }; const InputField = ( - { - className, - errorMessage, - isDanger, - prefix, - suffix, - isSuffixFocusVisible, - isSuffixVisible, - ...props - }: Props, + { className, errorMessage, isDanger, prefix, suffix, isSuffixFocusVisible, ...props }: Props, reference: ForwardedRef ) => { const errorMessages = errorMessage?.split('\n'); @@ -37,8 +27,7 @@ const InputField = ( className={classNames( styles.inputField, isDanger && styles.danger, - isSuffixFocusVisible && styles.isSuffixFocusVisible, - isSuffixVisible && styles.isSuffixVisible + isSuffixFocusVisible && styles.isSuffixFocusVisible )} > {prefix}