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

no-dynamic-styling rule should report the dynamic properties #137

Merged

Conversation

nusuke
Copy link
Contributor

@nusuke nusuke commented Sep 14, 2024

Closes #136

@nusuke nusuke changed the title RecipeVariant does not allow computedValue no-dynamic-styling rule should report the computed value Sep 14, 2024
@anubra266
Copy link
Collaborator

@nusuke. Thanks for working on this.
This is not the structure for variants.
It's this:

const button = cva({
  base: { },
  variants: {
    visual: {
      solid: { bg: 'red.200', color: 'white' },
    },
  },
})

Instead of

const button = cva({
  base: { },
  variants: {
      solid: { bg: 'red.200', color: 'white' },
  },
})

Also, we probably want to make this work for keys in css({}) not just recipes.

@nusuke
Copy link
Contributor Author

nusuke commented Sep 14, 2024

@anubra266 .
Thank you for your response.

The variant structure has been fixed.

We have confirmed that the same problem occurs with css({}).
I change !isRecipeVariant() to !isInPandaFunction()
Please point out if I am using the wrong helper function.

@anubra266 anubra266 changed the title no-dynamic-styling rule should report the computed value no-dynamic-styling rule should report the dynamic properties Sep 14, 2024
@anubra266
Copy link
Collaborator

@nusuke I made some changes to improve the PR.

@anubra266 anubra266 merged commit ac21839 into chakra-ui:main Sep 14, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

no-dynamic-styling rule should report the computed value
2 participants