Skip to content

How to use the new polymorphic API with components that build on Kobalte components? #138

Answered by fabien-ml
marbemac asked this question in Q&A
Discussion options

You must be logged in to vote

With the current API for Hope UI i've decided that almost all components will not be polymorphic.

For the case like yours i've created a LinkButton component which render an <a> by default and looks like a button.
In my API this one is polymorphic because we need to be able to replace <a> by solidjs router link and i was able to do it because to content is simpler than Button.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@marbemac
Comment options

@marbemac
Comment options

@fabien-ml
Comment options

@fabien-ml
Comment options

Answer selected by marbemac
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