Support for "polymorphic components" in framework and UI components #1820
davidhousedev
started this conversation in
Ideas + Feature Requests
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our first usage of the
<BuyNowButton />
we ran into some limitations around styling. We have an internal component library that we use to maintain consistency in styles, but found that we were not able to use the<BuyNowButton />
as-is because it doesn't enable a pattern known as polymorphic components.We were able to workaround this limitation by creating our own implementation of a
<BuyNowButton />
which invokesuseInstantCheckout()
and renders our own component library.In an ideal world, we'd be able to do something like this:
Prior art:
Beta Was this translation helpful? Give feedback.
All reactions