-
Hi all! I was testing panda and so far I like it a lot! Let's assume we have the a simple recipe: export const buttonRecipe = defineRecipe({
name: "button",
description: "Button recipe...",
base: {
display: "inline-flex",
justifyContent: "center",
padding: ".75em 1em",
cursor: "pointer",
},
variants: {
color: {
primary: {
backgroundColor: "#333",
color: "white",
"&:hover": {
backgroundColor: "#208764",
},
},
naked: {
"&:hover": {
backgroundColor: "#fcf9f5",
},
},
},
},
defaultVariants: {
color: "primary",
},
}); I use the button in my code like this... <button className={button({ color: "primary" })}>Click me</button> ...and I want to override or add extra styling like My solution for the moment - that I'm not so fond of - is to use the recipe with JSX style props. <styled.button className={button({ color: "primary" })} alignSelf="center">Click me</button> My question is: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
you can do it without style props, like import { css, cx } from "../styled-system/css"
<button className={cx(button({ color: "primary" }), css({ alignSelf: "center" }))}>Click me</button> |
Beta Was this translation helpful? Give feedback.
you can do it without style props, like