-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn the button into a link when href is provided #2864
Turn the button into a link when href is provided #2864
Conversation
Sometimes is useful to have links that are styled as buttons. This allows to pass in an href prop to the button component and turns the native root html element into an `a` when that's provided. Signed-off-by: Marco Ambrosini <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works
We could also check if there is the |
Co-authored-by: Raimund Schlüßler <[email protected]> Signed-off-by: Marco <[email protected]>
Follow up! |
Sometimes is useful to have links that are styled as buttons. This
allows to pass in an href prop to the button component and turns the
native root html element into an
a
when that's provided.Signed-off-by: Marco Ambrosini [email protected]