Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are nested color objects in theme supported? #413

Open
YassienW opened this issue Sep 14, 2023 · 0 comments
Open

Are nested color objects in theme supported? #413

YassienW opened this issue Sep 14, 2023 · 0 comments

Comments

@YassienW
Copy link
Contributor

I wasn't sure if i should file a bug report or not, so i'm asking first. I organize my colors as follows:

const theme: AppTheme = {
  colors: {
    blue: {
      1: '#83879c',
      2: '#B6B9CB'
      //3: etc..
    }
  }
}

Considering a simple button component that uses the xstyled color prop:

<Button color="blue.1"/>

I get this typescript error:

image

Should i change the way i organize my colors because this is expected? Or should it not throw a type error? The color itself works as it should, but the type is causing the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant