gluestack-ui icon indicating copy to clipboard operation
gluestack-ui copied to clipboard

Using `propertyResolver` does not resolve color mode based props

Open xavier-villelegier opened this issue 1 year ago • 1 comments

Description

Hey hey ! 👋

I'm trying to have a custom props resolved to a color token depending on the current theme. The props is supposed to be a backgroundStyle object passed down to a library, but for the sake of the example, I simplified it to a simple color props.

As you can see in the example, even if the color mode is dark, the value passed to the propertyResolver is always the default one, never the _dark one. It works fine when not using the resolver, but I'd like to use tokens in there.

Am I missing something ? 👀

CodeSandbox/Snack link

https://snack.expo.dev/1tnf2xC7WhJ6RY0T2-ee7

Steps to reproduce

  1. Go to on the Snack link
  2. See that when using propertyResolver, it never takes into account the _dark selector

gluestack-ui Version

1.1.28

Platform

  • [X] Expo
  • [ ] React Native CLI
  • [ ] Next
  • [X] Web
  • [X] Android
  • [X] iOS

Other Platform

No response

Additional Information

No response

xavier-villelegier avatar Jun 09 '24 12:06 xavier-villelegier

Hey @xavier-villelegier, Thanks for reporting the issue. We'll look into it.

ankit-tailor avatar Jul 09 '24 05:07 ankit-tailor