Skip to content

Commit 61ddee3

Browse files
fix: fixed but comments
1 parent 90f3ced commit 61ddee3

2 files changed

Lines changed: 49 additions & 9 deletions

File tree

app/components/UI/Bridge/components/BridgeTokenSelector/BridgeTokenSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface BridgeTokenSelectorRouteParams {
6868
}
6969

7070
const MIN_SEARCH_LENGTH = 3;
71-
const ESTIMATED_ITEM_HEIGHT = 72;
71+
const ESTIMATED_ITEM_HEIGHT = 68; // container paddingVertical(4×2) + itemWrapper paddingVertical(10×2) + AvatarSize.Lg(40px)
7272
const LOAD_MORE_DISTANCE_THRESHOLD = 300; // Distance from bottom to trigger load
7373

7474
export const BridgeTokenSelector: React.FC = () => {

app/components/UI/Bridge/components/TokenSelectorItem.tsx

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,35 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
457457
<TokenBalanceView
458458
balance={tokenBalance}
459459
isSelected={shouldShowSelectedStyle}
460-
textStyle={styles.rightValue}
461-
{...TOP_ROW_BALANCE_TEXT_STYLE}
460+
textStyle={[
461+
styles.rightValue,
462+
tokenBalanceTextProps?.textStyle,
463+
]}
464+
textVariant={
465+
tokenBalanceTextProps?.textVariant ??
466+
TOP_ROW_BALANCE_TEXT_STYLE.textVariant
467+
}
468+
textColor={
469+
tokenBalanceTextProps?.textColor ??
470+
TOP_ROW_BALANCE_TEXT_STYLE.textColor
471+
}
462472
/>
463473
) : (
464474
<FiatBalanceView
465475
balance={fiatBalance}
466476
isSelected={shouldShowSelectedStyle}
467-
textStyle={styles.rightValue}
468-
{...TOP_ROW_BALANCE_TEXT_STYLE}
477+
textStyle={[
478+
styles.rightValue,
479+
tokenBalanceTextProps?.textStyle,
480+
]}
481+
textVariant={
482+
tokenBalanceTextProps?.textVariant ??
483+
TOP_ROW_BALANCE_TEXT_STYLE.textVariant
484+
}
485+
textColor={
486+
tokenBalanceTextProps?.textColor ??
487+
TOP_ROW_BALANCE_TEXT_STYLE.textColor
488+
}
469489
/>
470490
)}
471491
</Box>
@@ -499,15 +519,35 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
499519
<FiatBalanceView
500520
balance={fiatBalance}
501521
isSelected={shouldShowSelectedStyle}
502-
textStyle={styles.rightValue}
503-
{...BOTTOM_ROW_BALANCE_TEXT_STYLE}
522+
textStyle={[
523+
styles.rightValue,
524+
tokenBalanceTextProps?.textStyle,
525+
]}
526+
textVariant={
527+
tokenBalanceTextProps?.textVariant ??
528+
BOTTOM_ROW_BALANCE_TEXT_STYLE.textVariant
529+
}
530+
textColor={
531+
tokenBalanceTextProps?.textColor ??
532+
BOTTOM_ROW_BALANCE_TEXT_STYLE.textColor
533+
}
504534
/>
505535
) : (
506536
<TokenBalanceView
507537
balance={tokenBalance}
508538
isSelected={shouldShowSelectedStyle}
509-
textStyle={styles.rightValue}
510-
{...BOTTOM_ROW_BALANCE_TEXT_STYLE}
539+
textStyle={[
540+
styles.rightValue,
541+
tokenBalanceTextProps?.textStyle,
542+
]}
543+
textVariant={
544+
tokenBalanceTextProps?.textVariant ??
545+
BOTTOM_ROW_BALANCE_TEXT_STYLE.textVariant
546+
}
547+
textColor={
548+
tokenBalanceTextProps?.textColor ??
549+
BOTTOM_ROW_BALANCE_TEXT_STYLE.textColor
550+
}
511551
/>
512552
)}
513553
</Box>

0 commit comments

Comments
 (0)