Update Button to only render <button>
#211
Labels
status: discussing
Under discussion threads. Closed as stale after 60 days of inactivity.
<button>
#211
Description
The Button component can render both a
button
or ana
depending on thehref
prop:ui/src/button/button.tsx
Lines 175 to 188 in 884b6ca
We designed the component this way to mimic React Bootstrap's Button to help ease the migration process. However, this implementation has caused some confusion and even code smell (code - the Button receives an
href
, which makes it a link, but theonClick
handler has some conditional that can make the link behave like a button).I think we should update Button to just render a
button
element. For links that look like a button, we can either:style
orvariant
prop ourLink
component (variant
could imply functionality differences, so I'm not sure if this prop is appropriate)Others
The button / link split was also mentioned in #23.
The text was updated successfully, but these errors were encountered: