Skip to content

Understanding cva and tokens #2403

Answered by anubra266
jimmymorris asked this question in Q&A
Discussion options

You must be logged in to vote
  1. textStyle works in cva https://play.panda-css.com/f6QneUBoVH
  2. You're using a runtime function. Panda works by static extraction. You can do this if you want a fallback, otherwise prefer the curly brace:
export const sampleRecipe = cva({
  base: {
    display: 'flex',
    color: 'token(colors.text.action.default)',
    // if you need fallback value
    color: 'token(colors.text.action.default, red)',
  },
});

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jimmymorris
Comment options

@anubra266
Comment options

Answer selected by jimmymorris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants