Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Aug 14, 2024
1 parent e0d88c3 commit 298ea3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
30 changes: 19 additions & 11 deletions src/components/Search/SearchStatusBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
import Hoverable from '@components/Hoverable';
import * as Expensicons from '@components/Icon/Expensicons';
import ScrollView from '@components/ScrollView';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -138,17 +140,23 @@ function SearchStatusBar({type, status}: SearchStatusBarProps) {
const isActive = status === item.key;

return (
<Button
key={item.key}
text={translate(item.text)}
onPress={onPress}
icon={item.icon}
iconFill={isActive ? theme.success : undefined}
innerStyles={!isActive && styles.bgTransparent}
textStyles={!isActive ? StyleUtils.getTextColorStyle(theme.textSupporting) : undefined}
hoverStyles={StyleUtils.getBackgroundColorStyle(!isActive ? theme.highlightBG : theme.border)}
medium
/>
<Hoverable>
{(isHovered) => (
<View>
<Button
key={item.key}
text={translate(item.text)}
onPress={onPress}
icon={item.icon}
iconFill={isActive || isHovered ? theme.success : undefined}
innerStyles={!isActive && styles.bgTransparent}
hoverStyles={StyleUtils.getBackgroundColorStyle(!isActive ? theme.highlightBG : theme.border)}
textStyles={!isActive && !isHovered && StyleUtils.getTextColorStyle(theme.textSupporting)}
medium
/>
</View>
)}
</Hoverable>
);
})}
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4253,7 +4253,7 @@ const styles = (theme: ThemeColors) =>
tabText: (isSelected: boolean) =>
({
marginLeft: 8,
...(isSelected ? FontUtils.fontFamily.platform.EXP_NEUE_BOLD : FontUtils.fontFamily.platform.EXP_NEUE),
...FontUtils.fontFamily.platform.EXP_NEUE_BOLD,
color: isSelected ? theme.text : theme.textSupporting,
lineHeight: variables.lineHeightNormal,
fontSize: variables.fontSizeNormal,
Expand Down

0 comments on commit 298ea3f

Please sign in to comment.