Skip to content

Commit

Permalink
fix icon colors
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Jan 2, 2024
1 parent 6eb0649 commit 4ea1be5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 31 deletions.
53 changes: 26 additions & 27 deletions src/components/FloatingActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import PressableWithFeedback from './Pressable/PressableWithFeedback';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Tooltip from './Tooltip/PopoverAnchorTooltip';

const AnimatedPath = Animated.createAnimatedComponent(Path);
Expand Down Expand Up @@ -96,40 +96,39 @@ const FloatingActionButton = React.forwardRef(({onPress, isActive, accessibility
onPress();
};


return (
<Tooltip text={translate('common.new')}>
<PressableWithoutFeedback
role={CONST.ROLE.BUTTON}
style={[styles.h100]}
onPress={toggleFabAction}
>
<View style={styles.bottomTabBarItem}>
<AnimatedPressable
ref={(el) => {
fabPressable.current = el;
if (buttonRef) {
buttonRef.current = el;
}
}}
accessibilityLabel={accessibilityLabel}
role={role}
pressDimmingValue={1}
onPress={toggleFabAction}
onLongPress={() => {}}
style={[styles.floatingActionButton, animatedStyle]}
>
<Svg
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
<View style={styles.bottomTabBarItem}>
<AnimatedPressable
ref={(el) => {
fabPressable.current = el;
if (buttonRef) {
buttonRef.current = el;
}
}}
accessibilityLabel={accessibilityLabel}
role={role}
pressDimmingValue={1}
onPress={toggleFabAction}
onLongPress={() => {}}
style={[styles.floatingActionButton, animatedStyle]}
>
<AnimatedPath
d="M12,3c0-1.1-0.9-2-2-2C8.9,1,8,1.9,8,3v5H3c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h5v5c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-5h5c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2h-5V3z"
animatedProps={animatedProps}
/>
</Svg>
</AnimatedPressable>
</View>
<Svg
width={variables.iconSizeNormal}
height={variables.iconSizeNormal}
>
<AnimatedPath
d="M12,3c0-1.1-0.9-2-2-2C8.9,1,8,1.9,8,3v5H3c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h5v5c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-5h5c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2h-5V3z"
animatedProps={animatedProps}
/>
</Svg>
</AnimatedPressable>
</View>
</PressableWithoutFeedback>
</Tooltip>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ import EReceiptIcon from '@assets/images/eReceiptIcon.svg';
import Exclamation from '@assets/images/exclamation.svg';
import Exit from '@assets/images/exit.svg';
import Expand from '@assets/images/expand.svg';
import ExpensifyCard from '@assets/images/expensify-card-icon.svg';
import ExpensifyAppIcon from '@assets/images/expensify-app-icon.svg';
import ExpensifyCard from '@assets/images/expensify-card-icon.svg';
import ExpensifyFooterLogoVertical from '@assets/images/expensify-footer-logo-vertical.svg';
import ExpensifyFooterLogo from '@assets/images/expensify-footer-logo.svg';
import ExpensifyWordmark from '@assets/images/expensify-wordmark.svg';
Expand Down
5 changes: 3 additions & 2 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ type MenuItemProps = (ResponsiveProps | UnresponsiveProps) &
contentFit?: ImageContentFit;

/** Is this in the Pane */
isPaneMenu: false,
isPaneMenu: false;
};

function MenuItem(
Expand Down Expand Up @@ -446,7 +446,8 @@ function MenuItem(
fill={
displayInDefaultIconColor
? undefined
: iconFill ?? StyleUtils.getIconFillColor(getButtonState(focused || isHovered, pressed, success, disabled, interactive), true, isPaneMenu)
: iconFill ??
StyleUtils.getIconFillColor(getButtonState(focused || isHovered, pressed, success, disabled, interactive), true, isPaneMenu)
}
/>
)}
Expand Down
3 changes: 3 additions & 0 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import {GestureResponderEvent, StyleProp, View, ViewStyle} from 'react-native';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -29,6 +30,7 @@ type SearchProps = {

function Search({onPress, placeholder, tooltip, style, containerStyle}: SearchProps) {
const styles = useThemeStyles();
const theme = useTheme();
const {translate} = useLocalize();

return (
Expand All @@ -46,6 +48,7 @@ function Search({onPress, placeholder, tooltip, style, containerStyle}: SearchPr
src={Expensicons.MagnifyingGlass}
width={variables.iconSizeSmall}
height={variables.iconSizeSmall}
fill={theme.icon}
/>
<Text
style={styles.searchInputStyle}
Expand Down
1 change: 1 addition & 0 deletions src/components/SubscriptAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function SubscriptAvatar({mainAvatar = {}, secondaryAvatar, subscriptIcon, size
width={subscriptIcon.width}
height={subscriptIcon.height}
additionalStyles={styles.alignSelfCenter}
fill={theme.icon}
/>
</View>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function BottomTabBar() {
>
<Icon
src={Expensicons.Gear}
fill={currentTabName === SCREENS.ALL_SETTINGS || currentTabName === SCREENS.WORKSPACE.INITIAL ? theme.iconMenu : undefined}
fill={currentTabName === SCREENS.ALL_SETTINGS || currentTabName === SCREENS.WORKSPACE.INITIAL ? theme.iconMenu : theme.icon}
/>
</PressableWithFeedback>
</Tooltip>
Expand Down

0 comments on commit 4ea1be5

Please sign in to comment.