Linear Gradient as Button background color #5184
codakkk
started this conversation in
Feature request
Replies: 5 comments 1 reply
|
Lurking codebase, Pressable should be allowed to get Linear Gradient, not Button. |
0 replies
|
Hello @codakkk, we'll surely consider this API for |
0 replies
|
@mayank-96 let me know if you would be interested in a pull request and best approach
|
0 replies
|
@johnf Thanks for your suggestion. We'll make those changes in the coming release. |
1 reply
|
@surajahmed Has this been implemented? How I can add a linear gradient to my buttons? Thanks |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
There's no way to pass Linear Gradient props.
Problem Statement
It's possible to pass Linear Gradient to every component except for Button.
Proposed Solution or API
<Button bg={{linearGradient={....}}} />
Alternatives
Trryied with parent Box:
<Box bgColor={{ linearGradient: { colors: ['#E31E24', '#B62322', '#962B24'], start: [0, 0], end: [1, 0], }, }}> <Button variant="unstyled">Applica Filtri</Button> </Box>but with bad results (losing all the props on child, like rounded, etc)
I tryied to pass the bg to _stack with bad results.
Additional Information
No response
All reactions