Closed Newbie012 closed 11 months ago
This is by design @Newbie012.
If you want to use a different name, consider updating the jsx
settings of the recipe to indicate the component name that should be tracked for that recipe.
recipes: {
buttonRecipe: {
jsx: ["Button", "ButtonRecipe"],
// ...
}
}
Read more here: https://panda-css.com/docs/concepts/recipes#advanced-jsx-tracking
Description
Update: This is the only needed change to reproduce the bug: https://github.com/chakra-ui/panda/compare/main...Newbie012:panda:bug-simple-show-recipe-name-weird-bug
When I define a recipe:
and then import it to
panda.config.ts
:and then I call it in
App.tsx
:It only works if the name of the component is identical to the name of the recipe. In this case,
buttonRecipe = ButtonRecipe
so the style is applied. But, if I comment out<ButtonRecipe>
, no style will be shown:Link to Reproduction
https://github.com/Newbie012/panda/tree/bug-component-name-must-be-like-recipe-name
Steps to reproduce
cd sandbox/vite-ts && pnpm install
pnpm dev
JS Framework
React (TS)
Panda CSS Version
0.20.1
Browser
Google Chrome 119
Operating System
Additional Information
No response