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

Dark mode props overwriting light props

Open jordmccord opened this issue 1 year ago • 1 comments

Description

While styling my button spinner I've noticed that the dark mode styles, when applied via the prop color value, overwrite the light mode styles

CodeSandbox/Snack link

No response

Steps to reproduce

  1. Apply styles to the button component via the config
  2. Update the spinner styles by adding prop -> color -> value
  3. Update the dark styles
  4. The light mode has the dark mode styles

gluestack-ui Version

1.1.22

Platform

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

Other Platform

No response

Additional Information

Screenshot 2024-04-09 at 14 33 13 Screenshot 2024-04-09 at 14 33 44 Screenshot 2024-04-09 at 14 42 44 Screenshot 2024-04-09 at 14 42 51

jordmccord avatar Apr 09 '24 13:04 jordmccord

@jordmccord Thanks for reporting this. We're working on it.

surajahmed avatar Apr 17 '24 06:04 surajahmed

Closing this issue since it has been resolved in the latest version. If the problem continues, please feel free to reopen it. Please update @gluestack-ui/themed and @gluestack-style/react to the latest version.

surajahmed avatar May 24 '24 13:05 surajahmed

This is still an issue on the nativewind alpha - setting mode="light" on GluestackUIProvider then having classnames such as className="bg-background-light dark:bg-background-dark" on a view element will render the dark background.

sashahilton00 avatar May 28 '24 18:05 sashahilton00