Skip to content

add more variations for a spectrum button web component in our component that extends the spectrum button #3108

Closed Answered by Westbrook
Ashish-Dobhal asked this question in Q&A
Discussion options

You must be logged in to vote

Monkey patching that types would be pretty involved, I'm not sure it would be worth it. Doing this is JS would be relatively straight forward, but that's not likely a good idea for something that is broadly used. In specific, variant holds a lot of logic while we continue to support deprecated variant, so beyond the basics of extending a type (which doesn't align to how class extension is meant to work), you'd need to reference back to the super or slice off functionality to achieve this. Again, I'm not sure it would be worth it.

One path that's not "supported" and could run into issues across future releases would be to realize that Button itself has very little code: https://github.com/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Ashish-Dobhal
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants