-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
Description
What happened?
On <Image /> elements tintColor is both a style and a prop, but it doesn't update when theme is changed, it keeps the old value.
On <View /> elements in new architecture for quite a while a experimental_backgroundImage style prop has been supported to do stuff like gradients, but when theme is changed this effect disappears completely.
Steps to Reproduce
<Image style={styles.image} source={...} />
<View style={styles.view} />
const styles = StyleSheet.create((theme) => ({
image: {
tintColor: theme.color.primary,
},
view: {
aspectRatio: 1,
experimental_backgroundImage: `linear-gradient(180deg, ${theme.color.primary} 50%, ${theme.color.secondary} 100%)`,
},
}));Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.17
React Native Version
0.81.5
Platforms
iOS
Expo
Yes
Additional information
- I use recommended version of
react-native-nitro-modulescompatibility table - I've searched for similar issues in this repository and found none
- I double-checked that my issue was not covered in documentation
Reactions are currently unavailable