-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Button component default class #4638
Comments
Note: the `<Button>` component does not add the `button` class by default, so I added it manually. See #4638
Included in #3418, for the next person looking. |
Note: the `<Button>` component does not add the `button` class by default, so I added it manually. See #4638
Note: the `<Button>` component does not add the `button` class by default, so I added it manually. See #4638
Hi @schlessera thank for creating this detailed issue. Rendering a button with button class by default causes many UI implications: I think the button component when no "style prop" is passed is more of semantic than style nature. It represents a button but it is up the component user to style it. |
I will close this issue for now if someone has new inputs to add, feel free to reopen the issue so we can discuss further! |
Issue Overview
The
<Button>
component does not contain the defaultbutton
class when it is not specified to be "Primary" or "Large".This causes a generic
<Button>
component to not be displayed like a button at all, but rather like a link.Steps to Reproduce (for bugs)
<Button className="some-button">
will render as a standard link.To produce a button that actually looks like one, without making it large or primary, you need to use something like this:
<Button className="some-button button">
will render as a standard link.Expected Behavior
I'd expect the
<Button>
component to render as a button by default.Current Behavior
The
<Button>
component renders as a link by default.Possible Solution
Make sure the
button
class is added by default, and provide a specific method of disabling this behavior, like anisLink
property.The text was updated successfully, but these errors were encountered: