infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.74k stars 1.4k forks source link

Image tintColor dark mode in expo/new arch template #2841

Open csulit opened 1 week ago

csulit commented 1 week ago

Describe the bug

I though the new architecture seems to have broken the theming for the image in the Ignite template when using the Expo router. The image tint color does not change when toggling to dark mode. However, when I remove the theme.isDark check and replace it with just the theme.colors.palette.neutral900, the color changes correctly between dark and light modes.

Works fine:

  <Image
    style={$welcomeFace}
    source={welcomeFace}
    resizeMode="contain"
    tintColor={theme.colors.palette.neutral900}
  />

Doesn't work:

  <Image
    style={$welcomeFace}
    source={welcomeFace}
    resizeMode="contain"
    tintColor={theme.isDark ? theme.colors.palette.neutral900 : undefined}
  />

Ignite version

10.0.4

Additional info

n/a

coolsoftwaretyler commented 1 week ago

Thanks!

We talked through this a little in Slack, but for other observers, I think this came through in: https://github.com/infinitered/ignite/pull/2636/files#diff-b0449a4720536aeac295ae925d29bb4f9c16b69d3c6da061a70dfc19c15b4a5eR59

Should be a quick PR to swap out tintColor and just use tintColor={theme.colors.palette.neutral900}

csulit commented 1 week ago

Just to document I want to contribute more on this project 🎉🍾

coolsoftwaretyler commented 1 week ago

@csulit - this would be an excellent way to start contributing if you want to fork and send us a PR