How am I supposed to use my gradient defined in my tokens ? #1656
Answered
by
LouisLecouturier
LouisLecouturier
asked this question in
Q&A
-
I've created gradients in my tokens like so : gradients: {
accent: {
value: {
type: "linear",
placement: 45,
stops: ["accent.500", "accent.700"],
},
description: "accent gradient used for buttons",
},
primary: {
value: {
type: "linear",
placement: 45,
stops: ["colors.primary.700", "colors.primary.900"],
},
description: "primary gradient used for buttons",
},
}, But I can't find any documentation on how to use it... const heroBackground = css(
{
bg: token("gradients.primary")
}
) But I get an error How can I use it ? |
Beta Was this translation helpful? Give feedback.
Answered by
LouisLecouturier
Nov 8, 2023
Replies: 1 comment
-
Okay turns out there is a cont styles = css({
bgGradient : "primary"
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
segunadebayo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay turns out there is a
bgGradient
property I didn't seeDidn't seem intuitive for me haha