Closed
Description
Describe the bug
According to #1972, LinkButtons have been removed in favor of <Button as="a" />
. If this is the recommended way of doing link buttons, then passing an href to the Button component should forward that prop to the a element. Otherwise, an onClick that sets the window.location.href has to be used which is more code and clunkier.
To Reproduce
Steps to reproduce the behavior:
- Go to https://primer.style/react/Button
- Update the first example to
<Button as="a" href="http://google.com">Default</Button>
- Click on the Button in the first example
Expected behavior
The user should be navigated to the url passed in as the href.
Desktop (please complete the following information):
- OS: Windows 10
- Browser chrome
- Version 101.0.4951.67 (Official Build) (32-bit)