From 7c4e8d7d7832f70ff1ed116a717617d775b7154e Mon Sep 17 00:00:00 2001 From: Petr Knetl Date: Tue, 6 Feb 2024 12:07:50 +0000 Subject: [PATCH] fix(suite-native): input top padding - fixes conditonal top padding, the padding should be always the same independent of `isFocused` state Closes #9472 --- suite-native/atoms/src/Input/Input.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/suite-native/atoms/src/Input/Input.tsx b/suite-native/atoms/src/Input/Input.tsx index 40bd403a296..b4ac20c34e0 100644 --- a/suite-native/atoms/src/Input/Input.tsx +++ b/suite-native/atoms/src/Input/Input.tsx @@ -55,7 +55,6 @@ type InputLabelStyleProps = { type InputStyleProps = { isIconDisplayed: boolean; - isFocused: boolean; }; const inputWrapperStyle = prepareNativeStyle( @@ -100,7 +99,7 @@ const inputWrapperStyle = prepareNativeStyle( }), ); -const inputStyle = prepareNativeStyle((utils, { isIconDisplayed, isFocused }) => ({ +const inputStyle = prepareNativeStyle((utils, { isIconDisplayed }) => ({ ...utils.typography.body, // letterSpacing from `typography.body` is making strange layout jumps on Android while filling the input. // This resets it to the default TextInput value. @@ -113,7 +112,7 @@ const inputStyle = prepareNativeStyle((utils, { isIconDisplayed borderWidth: 0, flex: 1, // Make the text input uniform on both platforms (https://stackoverflow.com/a/68458803/1281305) - paddingTop: isFocused ? utils.spacings.large : 0, + paddingTop: utils.spacings.large, paddingBottom: utils.spacings.extraSmall, })); @@ -251,7 +250,7 @@ export const Input = forwardRef(