Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah committed Dec 16, 2023
1 parent a6da78c commit 5bc120d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/FloatingActionButton/FabPlusIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, {useEffect} from 'react';
import Animated, {Easing, interpolateColor, useAnimatedProps, useSharedValue, withTiming} from 'react-native-reanimated';
import Svg, {Path} from 'react-native-svg';
import themeColors from '@styles/themes/default';
import useTheme from '@hooks/useTheme';

const AnimatedPath = Animated.createAnimatedComponent(Path);

Expand All @@ -12,6 +12,7 @@ const propTypes = {
};

function FabPlusIcon({isActive}) {
const theme = useTheme();
const animatedValue = useSharedValue(isActive ? 1 : 0);

useEffect(() => {
Expand All @@ -22,7 +23,7 @@ function FabPlusIcon({isActive}) {
}, [isActive, animatedValue]);

const animatedProps = useAnimatedProps(() => {
const fill = interpolateColor(animatedValue.value, [0, 1], [themeColors.textLight, themeColors.textDark]);
const fill = interpolateColor(animatedValue.value, [0, 1], [theme.textLight, theme.textDark]);

return {
fill,
Expand Down

0 comments on commit 5bc120d

Please sign in to comment.