From 982d5bbc1015ad41e96096ad86eecc9171cfc593 Mon Sep 17 00:00:00 2001 From: Shawn Borton Date: Wed, 12 Jun 2024 20:02:38 +0200 Subject: [PATCH 1/5] Fix label style for push rows that are empty --- src/components/AmountPicker/index.tsx | 2 +- src/components/TextPicker/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AmountPicker/index.tsx b/src/components/AmountPicker/index.tsx index 014932f7736b..eadd32cb5d54 100644 --- a/src/components/AmountPicker/index.tsx +++ b/src/components/AmountPicker/index.tsx @@ -29,7 +29,7 @@ function AmountPicker({value, description, title, errorText = '', onInputChange, hidePickerModal(); }; - const descStyle = !value || value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeLabel) : null; + const descStyle = !value || value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeNormal) : null; return ( diff --git a/src/components/TextPicker/index.tsx b/src/components/TextPicker/index.tsx index 0900884d874c..99dc3f7156ff 100644 --- a/src/components/TextPicker/index.tsx +++ b/src/components/TextPicker/index.tsx @@ -29,7 +29,7 @@ function TextPicker({value, description, placeholder = '', errorText = '', onInp hidePickerModal(); }; - const descStyle = !value || value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeLabel) : null; + const descStyle = !value || value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeNormal) : null; return ( @@ -37,7 +37,7 @@ function TextPicker({value, description, placeholder = '', errorText = '', onInp ref={forwardedRef} shouldShowRightIcon title={value ?? placeholder ?? ''} - descriptionTextStyle={descStyle} + //descriptionTextStyle={descStyle} description={description} onPress={showPickerModal} furtherDetails={furtherDetails} From 8e7bc2fd83954671712244e03af5080ee5e84b6f Mon Sep 17 00:00:00 2001 From: Shawn Borton Date: Wed, 12 Jun 2024 20:08:58 +0200 Subject: [PATCH 2/5] Clean up an old comment --- src/components/TextPicker/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TextPicker/index.tsx b/src/components/TextPicker/index.tsx index 99dc3f7156ff..0dd84352aad4 100644 --- a/src/components/TextPicker/index.tsx +++ b/src/components/TextPicker/index.tsx @@ -37,7 +37,7 @@ function TextPicker({value, description, placeholder = '', errorText = '', onInp ref={forwardedRef} shouldShowRightIcon title={value ?? placeholder ?? ''} - //descriptionTextStyle={descStyle} + descriptionTextStyle={descStyle} description={description} onPress={showPickerModal} furtherDetails={furtherDetails} From b24e326653491839c441cee86c3416227dac6536 Mon Sep 17 00:00:00 2001 From: Shawn Borton Date: Wed, 12 Jun 2024 20:47:46 +0200 Subject: [PATCH 3/5] Remove unneeded var --- src/components/AmountPicker/index.tsx | 3 --- src/components/TextPicker/index.tsx | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/components/AmountPicker/index.tsx b/src/components/AmountPicker/index.tsx index eadd32cb5d54..3752e17521b8 100644 --- a/src/components/AmountPicker/index.tsx +++ b/src/components/AmountPicker/index.tsx @@ -29,15 +29,12 @@ function AmountPicker({value, description, title, errorText = '', onInputChange, hidePickerModal(); }; - const descStyle = !value || value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeNormal) : null; - return ( Date: Thu, 13 Jun 2024 08:11:50 +0200 Subject: [PATCH 4/5] Remove unused imports --- src/components/AmountPicker/index.tsx | 2 -- src/components/TextPicker/index.tsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/components/AmountPicker/index.tsx b/src/components/AmountPicker/index.tsx index 3752e17521b8..74e252e164fc 100644 --- a/src/components/AmountPicker/index.tsx +++ b/src/components/AmountPicker/index.tsx @@ -2,8 +2,6 @@ import React, {forwardRef, useState} from 'react'; import type {ForwardedRef} from 'react'; import {View} from 'react-native'; import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; -import useStyleUtils from '@hooks/useStyleUtils'; -import variables from '@styles/variables'; import CONST from '@src/CONST'; import callOrReturn from '@src/types/utils/callOrReturn'; import AmountSelectorModal from './AmountSelectorModal'; diff --git a/src/components/TextPicker/index.tsx b/src/components/TextPicker/index.tsx index 0baa5cd9a354..07ef955854bf 100644 --- a/src/components/TextPicker/index.tsx +++ b/src/components/TextPicker/index.tsx @@ -2,9 +2,7 @@ import React, {forwardRef, useState} from 'react'; import type {ForwardedRef} from 'react'; import {View} from 'react-native'; import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; -import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import variables from '@styles/variables'; import CONST from '@src/CONST'; import TextSelectorModal from './TextSelectorModal'; import type {TextPickerProps} from './types'; From 2fad56eb9b0a2c6962c5d65f3b87e0b12e6bf9d0 Mon Sep 17 00:00:00 2001 From: Shawn Borton Date: Thu, 13 Jun 2024 16:03:34 +0200 Subject: [PATCH 5/5] Addressing lint again --- src/components/AmountPicker/index.tsx | 1 - src/components/TextPicker/index.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/components/AmountPicker/index.tsx b/src/components/AmountPicker/index.tsx index 74e252e164fc..b84ec19e2ffd 100644 --- a/src/components/AmountPicker/index.tsx +++ b/src/components/AmountPicker/index.tsx @@ -8,7 +8,6 @@ import AmountSelectorModal from './AmountSelectorModal'; import type {AmountPickerProps} from './types'; function AmountPicker({value, description, title, errorText = '', onInputChange, furtherDetails, rightLabel, ...rest}: AmountPickerProps, forwardedRef: ForwardedRef) { - const StyleUtils = useStyleUtils(); const [isPickerVisible, setIsPickerVisible] = useState(false); const showPickerModal = () => { diff --git a/src/components/TextPicker/index.tsx b/src/components/TextPicker/index.tsx index 07ef955854bf..968338391aaa 100644 --- a/src/components/TextPicker/index.tsx +++ b/src/components/TextPicker/index.tsx @@ -9,7 +9,6 @@ import type {TextPickerProps} from './types'; function TextPicker({value, description, placeholder = '', errorText = '', onInputChange, furtherDetails, rightLabel, ...rest}: TextPickerProps, forwardedRef: ForwardedRef) { const styles = useThemeStyles(); - const StyleUtils = useStyleUtils(); const [isPickerVisible, setIsPickerVisible] = useState(false); const showPickerModal = () => {