wcandillon / react-native-redash

The React Native Reanimated and Gesture Handler Toolbelt
https://wcandillon.gitbook.io/redash/
MIT License
1.99k stars 117 forks source link

How to pass fontFamily to useAnimatedStyle ? #483

Open hugoh59 opened 2 years ago

hugoh59 commented 2 years ago

When trying to set fontFamily style prop inside useAnimatedStyle, it give me an error:

Unrecognized font family 'Roboto-Regular'

const _priceStyleMinified = useAnimatedStyle(() => {
        return(
            {
                opacity: isActive.value ? 1 : 0,
                backgroundColor: 'white',
                position: 'absolute',
                right: 60,
                top: 22,
                fontSize: 20,
                fontWeight: '700',
                color: 'rgb(32,32,32)',
                letterSpacing: .4,
                textAlign: 'right',
                fontFamily: 'Roboto-Regular'
            }
        )
    });
Julienblc commented 1 year ago

Any solution for this ?