|
How to use gradients on |
Answered by
lachlanjc
Jun 17, 2020
Replies: 3 comments
|
@elpuas - not sure what you mean. If you want to have it in the theme by default for a component of yours, you can use the same code in the theme object as well. |
0 replies
|
If you're looking to use a gradient on a component, you can use a functional value inside sx={{
backgroundImage: theme => `linear-gradient(to bottom, ${theme.colors.red}, ${theme.colors.orange})`
}}Does that answer your question? |
0 replies
Answer selected by
elpuas
|
Yeah, you're both right, on the example, there was a missing ',' so I was confused, but it is all cool now great product. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're looking to use a gradient on a component, you can use a functional value inside
sx, like this:Does that answer your question?